From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbcFWVHW (ORCPT ); Thu, 23 Jun 2016 17:07:22 -0400 Received: from nm42-vm10.bullet.mail.bf1.yahoo.com ([216.109.114.155]:42222 "EHLO nm42-vm10.bullet.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbcFWVHU (ORCPT ); Thu, 23 Jun 2016 17:07:20 -0400 X-Yahoo-Newman-Id: 719812.50740.bm@smtp108.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Q6qu39gVM1mLr69FhSU3C2yc4K3REjzMSKjOzXCHkC7KXmc FIT7wvkSKtUx.NYpKL500jdiQnZGt1CnXyGbmMsJyNaldqYgO8Aqme3hGA.d iE4HNnz3mOSsU3rIyOgJ1mBoHDpudniF7ElGCOr.xUq7nQKCO6wE_V7ZuIL8 oNpQSfEmI3iO3y.4TkR68DLaz6_tjMUrS6uwb35nKSKcfDqETB0_meYWvB12 nZv0vwA1wuADi5P4nh7rgi6n5V_iK9.GMMKnORmgtdMexi1lz0bSxXT4HXjr aI_5RFRReF.Pv3ZWJrqMVVJvda4Nzlbw43BBS7HcjntPy7tgpgrSZ2NgNWtf 4TkKQUzfYV3c4mTkMrHW9yfNqShAyYGG.BNAjLeFD5w6iXpHrvybN99hI715 qJasj3qy0nn7HJiqztsypHrNS1_AfsP.z8UFoa9RxCk.igeJ1QpEzXlpcSKe PkSG3sz2FguRmcfXJ897EURTBUtSDPAQMJCvcGMLZ7nrrh.q2TqHm5YgXJN0 ifTHlLHhNqnr5R4KxLyR2Q1ef5alX99SXdzC.Kn7noEbtG2wHBSqO.b57QAM - X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- To: LSM , James Morris Cc: John Johansen , Stephen Smalley , Paul Moore , Tetsuo Handa , Kees Cook , Casey Schaufler , LKLM From: Casey Schaufler Subject: [PATCH v4 0/3] LSM: module hierarchy in /proc/.../attr Message-ID: <599d0a80-0838-2baa-8ee2-7eefafc10cec@schaufler-ca.com> Date: Thu, 23 Jun 2016 14:07:20 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 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 Subject: [PATCH v4 0/3] LSM: module hierarchy in /proc/.../attr 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 | 26 +++++-- 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 | 37 +++++++-- security/commoncap.c | 3 +- security/inode.c | 26 ++++++- security/loadpin/loadpin.c | 2 +- security/security.c | 169 ++++++++++++++++++++++++++++++++++++++++- security/selinux/hooks.c | 24 +++++- security/smack/smack_lsm.c | 23 +++--- security/tomoyo/tomoyo.c | 2 +- security/yama/yama_lsm.c | 2 +- 14 files changed, 382 insertions(+), 55 deletions(-)