mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Morris <jmorris@namei.org>
To: Kees Cook <keescook@chromium.org>
Cc: David Rheinsberg <david.rheinsberg@gmail.com>,
	John Johansen <john.johansen@canonical.com>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	linux-security-module <linux-security-module@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] apparmor: Restore Y/N in /sys for apparmor's "enabled"
Date: Wed, 10 Apr 2019 06:11:19 +1000 (AEST)	[thread overview]
Message-ID: <alpine.LRH.2.21.1904100611110.7633@namei.org> (raw)
In-Reply-To: <CAGXu5j+g8tPrDAYVKv26ci6zvGuvC1TMXto7weVP2QBymMRjhw@mail.gmail.com>

On Tue, 9 Apr 2019, Kees Cook wrote:

> On Mon, Apr 8, 2019 at 11:21 PM David Rheinsberg
> <david.rheinsberg@gmail.com> wrote:
> >
> > Hi
> >
> > On Mon, Apr 8, 2019 at 6:07 PM Kees Cook <keescook@chromium.org> wrote:
> > >
> > > Before commit c5459b829b71 ("LSM: Plumb visibility into optional "enabled"
> > > state"), /sys/module/apparmor/parameters/enabled would show "Y" or "N"
> > > since it was using the "bool" handler. After being changed to "int",
> > > this switched to "1" or "0", breaking the userspace AppArmor detection
> > > of dbus-broker. This restores the Y/N output while keeping the LSM
> > > infrastructure happy.
> > >
> > > Before:
> > >         $ cat /sys/module/apparmor/parameters/enabled
> > >         1
> > >
> > > After:
> > >         $ cat /sys/module/apparmor/parameters/enabled
> > >         Y
> > >
> > > Reported-by: David Rheinsberg <david.rheinsberg@gmail.com>
> > > Link: https://lkml.kernel.org/r/CADyDSO6k8vYb1eryT4g6+EHrLCvb68GAbHVWuULkYjcZcYNhhw@mail.gmail.com
> > > Fixes: c5459b829b71 ("LSM: Plumb visibility into optional "enabled" state")
> > > Signed-off-by: Kees Cook <keescook@chromium.org>
> > > ---
> > > This fix, if John is okay with it, is needed in v5.1 to correct the
> > > userspace regression reported by David.
> > > ---
> > >  security/apparmor/lsm.c | 49 ++++++++++++++++++++++++++++++++++++++++-
> > >  1 file changed, 48 insertions(+), 1 deletion(-)
> >
> > This looks good to me. Thanks a lot! If this makes v5.1, I will leave
> > the apparmor-detection in dbus-broker as it is, unless someone asks me
> > to parse 0/1 as well?
> >
> > I cannot judge whether the apparmor_initialized check is correct, but
> > for the parameter parsing:
> >
> > Reviewed-by: David Rheinsberg <david.rheinsberg@gmail.com>
> 
> Thanks!
> 
> James, are you able to take this for v5.1 fixes?

Sure.

-- 
James Morris
<jmorris@namei.org>


  reply	other threads:[~2019-04-09 20:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 16:07 Kees Cook
2019-04-08 16:58 ` John Johansen
2019-04-08 17:25   ` Kees Cook
2019-04-08 17:47     ` John Johansen
2019-04-09  6:21 ` David Rheinsberg
2019-04-09 15:16   ` Kees Cook
2019-04-09 20:11     ` James Morris [this message]
2019-04-09 20:11     ` James Morris
2019-04-09 20:55       ` Kees Cook
2019-04-09 21:17         ` John Johansen
2019-04-09 21:17       ` John Johansen

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=alpine.LRH.2.21.1904100611110.7633@namei.org \
    --to=jmorris@namei.org \
    --cc=david.rheinsberg@gmail.com \
    --cc=john.johansen@canonical.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®