From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752872AbbCLAmd (ORCPT ); Wed, 11 Mar 2015 20:42:33 -0400 Received: from smtp102.biz.mail.bf1.yahoo.com ([98.139.221.61]:32223 "EHLO smtp102.biz.mail.bf1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307AbbCLAm1 (ORCPT ); Wed, 11 Mar 2015 20:42:27 -0400 X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: hVJKpN0VM1nT.SB.DZEAhIHwZDGust1GPxCkk1PrIx29.lc 8rVg.quSx8EBRad3H1dmMpZ5Q2L.fXr0qW4FmL9BMdPt7vGN3sWwto0H1zKv 9nfHZ_X0OTQupjoPyvQW_.e1HwX2euxLAQOMfk3gvDaDPX_r5tNIa6g.Syeb TymEgWe9JDBKezabyLjBiZO1vHVWctO548tQg2JaeW5_I7cIM4kAY6JkcMkO ulaW_YYZPtI.ZFgteqwcmliP4W.oNnTZFJ0wFbWGBjbAhrl4JJxJWNK8ciyR oycfubz20i8_lOUxVHHqfZ.m0YJKmj571ViFTUAf5OuC4SB09Tq7vkIRNSkC wj3akaBOEbABMbQ3GemLnaOzaBwNOTwkLxmwypr79ILuY7hWnU6IZLSMIbHW gSOYVn6YQ0csO4K6oVmAi_67zTv3AZD7tSNJ.oIkga.oqjI6A6_bxCgRg0nb giQeRXzwEnd7UmI1LP_vd00HeXO0NQ0dlQGw1bsfo1uSaTM2KpF4.WQL_HuK ZucZ7X3G9DZocKtGVU6dg2we70AKHk4n4gAGgV3xXoV8L8OpLw6P8kDNW5gz thz8ng.UIdbwEl2hivAeAb7srZFjRGanHE1VXR2myfoqqdmp3f.fjuCkcmiB byb0XYgbIXOf. X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- Message-ID: <5500E0EF.9030902@schaufler-ca.com> Date: Wed, 11 Mar 2015 17:42:23 -0700 From: Casey Schaufler User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: James Morris , James Morris , LSM , LKLM CC: Paul Moore , John Johansen , Tetsuo Handa , Stephen Smalley , Eric Paris , Kees Cook Subject: Re: [PATCH 0/7 v21] LSM: Multiple concurrent LSMs References: <54FE4553.3000209@schaufler-ca.com> In-Reply-To: <54FE4553.3000209@schaufler-ca.com> 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 On 3/9/2015 6:13 PM, Casey Schaufler wrote: > Subject: [PATCH 0/7 v21] LSM: Multiple concurrent LSMs If you aren't up for patch drudgery there's a git repository: http://git.gitorious.org/smack-next/kernel.git#stacking-v21 > > Replace the current ad hoc stacking of the capabilities > and Yama security modules with a generalized stacking scheme. > > The old structure had a single set of module hooks contained > in a security_operations structure. This structure was initialized > with a set of stubs referred to as the "capabilities" module. > In fact only a few of these hooks actually did anything useful. > When a module replaced the capabilities module the entries > supplied replaced those from the capabilities module. The > new hook was expected to call the replaced capability code > if "stacking" was desired, which it usually was. Yama stacking > is done by ifdefs in the security infrastructure. > > The new structure provides a list of module hooks for each > interface. The non-trivial functions from the capabilities > module are add to the list first. If Yama stacking is configured > the Yama functions are added next. If a module is specified as > the "default" module, or is specified on the command line, it > is added next. > > Functions are called in the order added to the list. The > security interfaces stop when a function indicates an access > denial. It is possible for a list to be empty. That is treated > as a success in most cases. > > Each security module provides an array of function list entries. > This is initialized with the information needed to properly add > the entries to the function lists. > > The sheer size of this patch set is somewhat frightening. This > is an artifact of the number of security interfaces involved and > except for a few cases the changes are mechanical in nature. > Except for the removal of some information specific to the security > module infrastructure itself, the change is transparent to the rest > of the kernel. > > This is going to break out-of-tree security modules. It's easy to > update a module to the new scheme, and I'd be happy to do it for > any module I know about, but if it isn't in the tree, I don't know > about it. > > The stacking of modules that use the security blob pointers > cred->security, inode->i_security, etc has not been addressed. > That is future work with a delightful set of issues. > > This patch set is based on James Morris' security-next tree, > which is itself based on Linus' 4.0-rc1. It reflects the 11 > patches of v20. > > Signed-off-by: Casey Schaufler > --- > include/linux/lsm_hooks.h | 1872 ++++++++++++++++++++++++++++++++++++++++++++ > include/linux/security.h | 1613 +------------------------------------- > security/Makefile | 2 +- > security/apparmor/domain.c | 4 +- > security/apparmor/lsm.c | 131 ++-- > security/capability.c | 1164 --------------------------- > security/commoncap.c | 36 +- > security/security.c | 979 ++++++++++++++++------- > security/selinux/hooks.c | 477 +++++------ > security/smack/smack.h | 4 +- > security/smack/smack_lsm.c | 305 ++++---- > security/smack/smackfs.c | 2 +- > security/tomoyo/tomoyo.c | 72 +- > security/yama/yama_lsm.c | 60 +- > 14 files changed, 3071 insertions(+), 3650 deletions(-) > > -- > To unsubscribe from this list: send the line "unsubscribe linux-security-module" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >