From: Greg KH <gregkh@linuxfoundation.org>
To: Casey Schaufler <casey@schaufler-ca.com>
Cc: casey.schaufler@intel.com, jmorris@namei.org,
linux-security-module@vger.kernel.org, selinux@vger.kernel.org,
linux-audit@redhat.com, keescook@chromium.org,
john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp,
paul@paul-moore.com, sds@tycho.nsa.gov,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [PATCH v22 12/23] LSM: Specify which LSM to display
Date: Sat, 7 Nov 2020 10:15:29 +0100 [thread overview]
Message-ID: <20201107091529.GA23328@kroah.com> (raw)
In-Reply-To: <31027d8e-50bc-70be-b4f2-a96a84de2bae@schaufler-ca.com>
On Fri, Nov 06, 2020 at 04:20:43PM -0800, Casey Schaufler wrote:
> On 11/5/2020 1:22 AM, Greg KH wrote:
> > On Wed, Nov 04, 2020 at 03:41:03PM -0800, Casey Schaufler wrote:
> >> Create a new entry "display" in the procfs attr directory for
> >> controlling which LSM security information is displayed for a
> >> process. A process can only read or write its own display value.
> >>
> >> The name of an active LSM that supplies hooks for
> >> human readable data may be written to "display" to set the
> >> value. The name of the LSM currently in use can be read from
> >> "display". At this point there can only be one LSM capable
> >> of display active. A helper function lsm_task_display() is
> >> provided to get the display slot for a task_struct.
> >>
> >> Setting the "display" requires that all security modules using
> >> setprocattr hooks allow the action. Each security module is
> >> responsible for defining its policy.
> >>
> >> AppArmor hook provided by John Johansen <john.johansen@canonical.com>
> >> SELinux hook provided by Stephen Smalley <sds@tycho.nsa.gov>
> >>
> >> Reviewed-by: Kees Cook <keescook@chromium.org>
> >> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
> >> Acked-by: Paul Moore <paul@paul-moore.com>
> >> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
> >> Cc: linux-api@vger.kernel.org
> >> ---
> >> fs/proc/base.c | 1 +
> >> include/linux/lsm_hooks.h | 17 +++
> >> security/apparmor/include/apparmor.h | 3 +-
> >> security/apparmor/lsm.c | 32 +++++
> >> security/security.c | 169 ++++++++++++++++++++++++---
> >> security/selinux/hooks.c | 11 ++
> >> security/selinux/include/classmap.h | 2 +-
> >> security/smack/smack_lsm.c | 7 ++
> >> 8 files changed, 223 insertions(+), 19 deletions(-)
> >>
> >> diff --git a/fs/proc/base.c b/fs/proc/base.c
> >> index 0f707003dda5..7432f24f0132 100644
> >> --- a/fs/proc/base.c
> >> +++ b/fs/proc/base.c
> >> @@ -2806,6 +2806,7 @@ static const struct pid_entry attr_dir_stuff[] = {
> >> ATTR(NULL, "fscreate", 0666),
> >> ATTR(NULL, "keycreate", 0666),
> >> ATTR(NULL, "sockcreate", 0666),
> >> + ATTR(NULL, "display", 0666),
> > That's a vague name, any chance it can be more descriptive?
>
> Sure. How about lsm_display, or display_lsm? I wouldn't say that
> any of the files in /proc/*/attr have especially descriptive names,
> but that's hardly an excuse.
I still don't understand what "display" means in this context. Perhaps
documentation will help clear it up?
thanks,
greg k-h
next prev parent reply other threads:[~2020-11-07 9:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201104234114.11346-1-casey.ref@schaufler-ca.com>
2020-11-04 23:40 ` [PATCH v22 00/23] LSM: Module stacking for AppArmor Casey Schaufler
2020-11-04 23:40 ` [PATCH v22 01/23] LSM: Infrastructure management of the sock security Casey Schaufler
2020-11-04 23:40 ` [PATCH v22 02/23] LSM: Create and manage the lsmblob data structure Casey Schaufler
2020-11-04 23:40 ` [PATCH v22 03/23] LSM: Use lsmblob in security_audit_rule_match Casey Schaufler
2020-11-04 23:40 ` [PATCH v22 04/23] LSM: Use lsmblob in security_kernel_act_as Casey Schaufler
2020-11-04 23:40 ` [PATCH v22 05/23] LSM: Use lsmblob in security_secctx_to_secid Casey Schaufler
2020-11-04 23:40 ` [PATCH v22 06/23] LSM: Use lsmblob in security_secid_to_secctx Casey Schaufler
2020-11-04 23:40 ` [PATCH v22 07/23] LSM: Use lsmblob in security_ipc_getsecid Casey Schaufler
2020-11-04 23:40 ` [PATCH v22 08/23] LSM: Use lsmblob in security_task_getsecid Casey Schaufler
2020-11-04 23:41 ` [PATCH v22 09/23] LSM: Use lsmblob in security_inode_getsecid Casey Schaufler
2020-11-04 23:41 ` [PATCH v22 10/23] LSM: Use lsmblob in security_cred_getsecid Casey Schaufler
2020-11-04 23:41 ` [PATCH v22 11/23] IMA: Change internal interfaces to use lsmblobs Casey Schaufler
2020-11-04 23:41 ` [PATCH v22 12/23] LSM: Specify which LSM to display Casey Schaufler
2020-11-05 9:22 ` Greg KH
2020-11-07 0:20 ` Casey Schaufler
2020-11-07 9:15 ` Greg KH [this message]
2020-11-07 22:05 ` John Johansen
2020-11-09 22:28 ` Casey Schaufler
2020-11-09 22:47 ` John Johansen
2020-11-04 23:41 ` [PATCH v22 13/23] LSM: Ensure the correct LSM context releaser Casey Schaufler
2020-11-04 23:41 ` [PATCH v22 14/23] LSM: Use lsmcontext in security_secid_to_secctx Casey Schaufler
2020-11-05 0:49 [PATCH v22 00/23] LSM: Module stacking for AppArmor Casey Schaufler
2020-11-05 0:49 ` [PATCH v22 12/23] LSM: Specify which LSM to display Casey Schaufler
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=20201107091529.GA23328@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=casey.schaufler@intel.com \
--cc=casey@schaufler-ca.com \
--cc=jmorris@namei.org \
--cc=john.johansen@canonical.com \
--cc=keescook@chromium.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=sds@tycho.nsa.gov \
--cc=selinux@vger.kernel.org \
/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