public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Andrea Bolognani <abologna@redhat.com>
Cc: passt-dev@passt.top, "Niklas Edmundsson" <nikke@accum.se>,
	"Jim Fehlig" <jfehlig@suse.com>,
	"Maxime Bélair" <maxime.belair@canonical.com>,
	"Dario Faggioli" <dfaggioli@suse.com>,
	devel@lists.libvirt.org
Subject: Re: [PATCH] apparmor: Upgrade ABI version to 4.0, explicitly enable user namespace creation
Date: Tue, 13 Jan 2026 23:25:24 +0100	[thread overview]
Message-ID: <20260113232524.1a67714e@elisabeth> (raw)
In-Reply-To: <CABJz62MEuT_6G8RKyNCP72kTvjFZ3ew3SXgsUXYcCbnzUcVVBg@mail.gmail.com>

On Tue, 13 Jan 2026 05:06:41 -0800
Andrea Bolognani <abologna@redhat.com> wrote:

> On Mon, Jan 12, 2026 at 06:46:07PM +0100, Stefano Brivio wrote:
> > On Mon, 12 Jan 2026 08:11:44 -0700 Andrea Bolognani <abologna@redhat.com> wrote:
> >  
> > > [adding libvirt devel list]
> > >
> > > On Sat, Jan 10, 2026 at 04:14:30PM +0100, Stefano Brivio wrote:  
> > > > In the 3.0 AppArmor ABI version we currently use, user namespace rules
> > > > are not supported, and, as long as we load confined profiles, those
> > > > implicitly allow creation of user namespaces.
> > > >
> > > > However, ABI version 4.0 introduces rules for user namespaces, and if
> > > > we don't specify any, we can't create user namespaces, see:
> > > >
> > > >   https://gitlab.com/apparmor/apparmor/-/wikis/unprivileged_userns_restriction
> > > >
> > > > This wouldn't affect us in general, given that we're using the 3.0
> > > > ABI, but libvirt's policy uses 4.0 instead, and if our abstractions
> > > > are used from there, no matter what ABI policy version we declare,
> > > > rules for user namespace creation now match ABI policy version 4.0.  
> > >
> > > AFAICT libvirt's policy doesn't explicitly declares any ABI version,
> > > so how does that work? Is the most recent one being used in that
> > > case?  
> >
> > Oh, right, I forgot to mention that this is implicit from including
> > abstraction/base in libvirt's policy, which uses 4.0 on all the current
> > versions of AppArmor-enabled distributions I checked (Debian, including
> > stable/trixie, Ubuntu, openSUSE).  
> 
> Got it.
> 
> Note that libvirt still targets Debian 12 too, and that's stuck with
> AppArmor 3. Same for Ubuntu 22.04, though that one is getting dropped
> from our support matrix in just a few months.

Ah, thanks for the information. But anyway I don't plan to backport this
change to anything before trixie, so I don't think there should be any
problem with it.

> > > Do we want to make the ABI version explicit in libvirt's policy? If
> > > so, should we stick with 3.0 for maximum compatibility?  
> >
> > I wouldn't make it explicit. Yes, sticking to 3.0 would have avoided
> > this issue and resulted in better compatibility overall but would cause
> > even more problems if you ever need to switch "back" to 4.0 at some
> > point in time.
> >
> > I think that using the version from abstraction/base as libvirt does
> > is actually a more convenient and compatible approach in general.
> >
> > We didn't do that in passt's policy because the rules included there
> > are too broad, but given that libvirtd's policy already includes it,
> > I'd suggest to keep it that way.  
> 
> That sounds good, especially given the OS support constraints
> mentioned above.
> 
> Nothing to be done on the libvirt side then! That's perfect :)

Cheers. :)

-- 
Stefano


      reply	other threads:[~2026-01-13 22:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-10 15:14 Stefano Brivio
2026-01-12 15:11 ` Andrea Bolognani
2026-01-12 17:46   ` Stefano Brivio
2026-01-13 13:06     ` Andrea Bolognani
2026-01-13 22:25       ` Stefano Brivio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260113232524.1a67714e@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=abologna@redhat.com \
    --cc=devel@lists.libvirt.org \
    --cc=dfaggioli@suse.com \
    --cc=jfehlig@suse.com \
    --cc=maxime.belair@canonical.com \
    --cc=nikke@accum.se \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).