Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935537AbcJ0AB5 (ORCPT ); Wed, 26 Oct 2016 20:01:57 -0400 Received: from nm17-vm0.bullet.mail.ne1.yahoo.com ([98.138.91.58]:50215 "EHLO nm17-vm0.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935311AbcJ0ABm (ORCPT ); Wed, 26 Oct 2016 20:01:42 -0400 X-Yahoo-Newman-Id: 857883.98482.bm@smtp225.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: a_9CE4sVM1kbU3bB3GGRL4jTi7fCUBksfefciiJJgpG3L.D M4t_N4UBgyLyBOKXWvhtrvPSyPuNZGNWwvyxZYTSSHqy86KeAgHyszwnxacc sLdqToi8YpHEeT.swC0tcNbkJ9H89DfwsFEinpRROW5L1dpV06Zh971i56yM XoY7UqTBrxnxF6x10ZaXZ7FKr_xRfGsDITfCRd4j5g2vJfjsthS6u30_3TS4 ZRdl_Znyq7GrYkZ_BtHW5UOePh_Uota0qxm._UQomWkEHIxllZ7qWaln4li0 qdKVRq04iofnWyBdVCHpdzLoufUBwYxK4tUjfH4pi0foGio6omxKuFMB9Cam v6LHhXJXzvqkPQD2zfRD7EGPGygx4kgdDPLt0yuU5yRMwNAuu05RQVey5qcr cud5TAsC2FyI7oeztm0dzAqwbnDNsMm2dZNzn8aZIRtieJqGVhr25J13JTDp 2bjmaYZxt6v4nbOBcnLI_yNJoj0RrGZoYTTF8qFJZVg66KyLtGHR.t_S1C31 ogWfoeuKrFwMgAOf7dsnVefHNb1.wwRgZmyKuJcWRQxt3xJ.hWCnsnS9vBF4 wGVyVzk8yD53a X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- To: LSM , James Morris Cc: John Johansen , Paul Moore , Kees Cook , Stephen Smalley , Tetsuo Handa , LKLM , Casey Schaufler From: Casey Schaufler Subject: [PATCH v6 0/3] LSM: security module information improvements Message-ID: <00f80c77-9623-7e9e-8980-63b362a4f16c@schaufler-ca.com> Date: Wed, 26 Oct 2016 16:56:02 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2080 Lines: 60 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 --- 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(-)