From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753337AbcFJVWH (ORCPT ); Fri, 10 Jun 2016 17:22:07 -0400 Received: from nm19-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.162]:39287 "EHLO nm19-vm0.bullet.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753055AbcFJVWE (ORCPT ); Fri, 10 Jun 2016 17:22:04 -0400 X-Yahoo-Newman-Id: 440843.7584.bm@smtp110.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: rfPy_yYVM1m.BxeRrzkOx5A7xCvF8qVtHCJKwOueHHGwHBU 3FZYIYu7hRZ0QN_rqmloE6_mvmX5Zsi6LzXsDmpEj_bw_snsXKMjpQlxlKgD aIPC2xaW2By9rCcw2dKPMcTvaxENKNiO78T6hog5dy.AhpRGGuGJs67cdbUR bq2z81W6vPVCCyF2Ur3GA4UIG7kbZ1qDrG7jZDxencf90PKh9NJP1qAbXddu cZZnodA76H6Pj809dfYgcZ2LfBJssAlktuO1ahwLDm6djQ1aJHFZvjMIuyI_ i9k5w1AMWhn5ChxkodLl7rP_4E7UsVUNxAoUBMCj5j0wbZ92T8zyuwtcoiVD brbsmVv_1ScX_Eg0o.vcrWXQt_GDuY9YaUahmsEZpmcOW4FsvXFq37yx6xPf N2diDkTkdD8H7Q9a8DPBxx4mC4yyElhYWw1UA6BuNSoSfgshP3tm6DLiE0dW ANpux9.9J20jbOwanG4os_xwaFDip1TiN0Gnr9ebJkF4ij0Z65hneHonb5XE KOPtgwnyVyOTFVzwdtljXqKwEra4v_n2H.236jUJtuHDEwTwmSBV2ZJbtyeY - 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 v3 0/3] LSM: module hierarchy in /proc/.../attr Message-ID: Date: Fri, 10 Jun 2016 14:21:59 -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 v3 0/3] LSM: module hierarchy in /proc/.../attr 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 | 167 ++++++++++++++++++++++++++++++++++++++++- 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, 380 insertions(+), 55 deletions(-)