All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: LSM <linux-security-module@vger.kernel.org>,
	James Morris <jmorris@namei.org>
Cc: John Johansen <john.johansen@canonical.com>,
	Paul Moore <paul@paul-moore.com>,
	Kees Cook <keescook@chromium.org>,
	Stephen Smalley <sds@tycho.nsa.gov>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	LKLM <linux-kernel@vger.kernel.org>,
	Casey Schaufler <casey@schaufler-ca.com>
Subject: [PATCH v6 0/3] LSM: security module information improvements
Date: Wed, 26 Oct 2016 16:56:02 -0700	[thread overview]
Message-ID: <00f80c77-9623-7e9e-8980-63b362a4f16c@schaufler-ca.com> (raw)

Subject: [PATCH v6 0/3] LSM: security module information improvements

Changes from v5:
	Rebased on 4.9-rc2

Changes from v4:
	Use kasprintf instead of kzalloc() ... sprintf in more places.
	More in the documentation.
	Separate module information in contexts with ",". (not yet visible)

Changes from v3:
	Use kasprintf instead of kzalloc() ... sprintf.

Create interfaces that make it possible to deal with process
attributes in the face of multiple "major" security modules.

Patch 1/3 adds /sys/kernel/security/lsm, which provides
a list of the active security modules on the system.

	$ cat /sys/kernel/security/lsm
	capability,yama,loadpin,smack

Patch 2/3 adds a subdirectory in /proc/.../attr for each
security module that exports process attribute data. This
allows a program in easily differentiate between the "current"
value for Smack and AppArmor.

	$ cat /proc/self/attr/smack/current
	System

	$ cat /proc/self/attr/apparmor/current
	unconfined

Patch 3/3 adds an interface that provides module identified
information that otherwise matches the "current" attr.
This allows a system with multiple modules to provide the
complete security "context" in one place. A (future) system
with both Smack and AppArmor might report:

	$ cat /proc/self/attr/context
	smack='System',apparmor='unconfined'

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>

---
 Documentation/security/LSM.txt |  34 ++++++--
 fs/proc/base.c                 |  95 +++++++++++++++++++---
 fs/proc/internal.h             |   1 +
 include/linux/lsm_hooks.h      |  12 +--
 include/linux/security.h       |  15 ++--
 security/apparmor/lsm.c        |  38 +++++++--
 security/commoncap.c           |   3 +-
 security/inode.c               |  26 +++++-
 security/loadpin/loadpin.c     |   2 +-
 security/security.c            | 177 ++++++++++++++++++++++++++++++++++++++++-
 security/selinux/hooks.c       |  22 ++++-
 security/smack/smack_lsm.c     |  22 ++---
 security/tomoyo/tomoyo.c       |   2 +-
 security/yama/yama_lsm.c       |   2 +-
 14 files changed, 395 insertions(+), 56 deletions(-)

             reply	other threads:[~2016-10-27  0:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 23:56 Casey Schaufler [this message]
2016-10-27  0:01 ` [PATCH v6 1/3] LSM: Add /sys/kernel/security/lsm Casey Schaufler
2016-11-01 12:53   ` Tetsuo Handa
2016-11-01 17:25     ` Casey Schaufler
2016-11-04 14:11       ` Tetsuo Handa
2016-10-27  0:01 ` [PATCH v6 2/3] LSM: module hierarchy in /proc/.../attr Casey Schaufler
2016-10-27  0:01 ` [PATCH v6 3/3] LSM: Add context interface for proc attrs Casey Schaufler
2016-10-27 21:34 ` [PATCH v6 0/3] LSM: security module information improvements Kees Cook
2016-10-27 22:32 ` James Morris
2016-10-27 22:57   ` John Johansen
2016-10-28  0:05   ` Casey Schaufler
2016-10-28  9:28     ` James Morris
2016-10-28 15:22       ` 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=00f80c77-9623-7e9e-8980-63b362a4f16c@schaufler-ca.com \
    --to=casey@schaufler-ca.com \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=keescook@chromium.org \
    --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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.