Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3189706imm; Sun, 16 Sep 2018 11:54:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYgRm4p/dv4pHkhB0hFVvEazGwRAHeli/CvNdnEBeeBG7fmsGTYb0I+LnD6RfgfX7D4SLma X-Received: by 2002:a17:902:3041:: with SMTP id u59-v6mr21249280plb.99.1537124046209; Sun, 16 Sep 2018 11:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537124046; cv=none; d=google.com; s=arc-20160816; b=RZRsRQWvhIQgvGBlnBLozetgTwjUxdxiK5wU9XM/punm2KXkLt82BvLLnYY6dUzS4x veZ7bG8FIHDmhR9jld8d5J2QfrBpvvtFZW3bhYtoaL1Yo178W4zwLPhIrzFD6aISaNsT bLVfGV4iDAf4nHfeY+A1nuw+zO05fYeUQvZYdKUiDAO93aTaCXjOSLfbL1SAE1NUF/mM eHwS916UtRKvXxRjU4q/l+19ynOq3w1O5kIzF2JwnWSXqWpeSw/eOcV4AKMfLpTq5vxd U6H3iaweYK8JSUImFohBS+50bt1OptBXKwN4ow5ZLqiFQFJvkxk1fjVhh83AShRnJqAX TUKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=9YjMw12tbw7YqaqKwra2X7Q3ePUiT7BpqQBbuwaaWhw=; b=hunZxu0mZkMy+8RJgoff17iXvgCc+nE5vpGWITrBgWmmf4KRhspdi3EnyG5uqmPjnI mjS5lPofjPYVM/3MQwyekB988w3BeP/VietszLZE8svh/KyjO/Liji2IDsMVyu0SWwMU EjA3L88SggYI0E2Fsbuv0e9AuLIwAIm5vDLLPn46Ns5IEebJkzHUFOdGlgkRhf1/zGPf o9Uz7k6JG1aJPZ25JI79XNSHAfL6dibZX33ePfUX7uThbiwmjD1MiHoESnjAoKQZRNAH nMthOwhBN3uDEEbUXMyMmWWAC3z6tUbVibXm1+2yh0GnsOUjfq0WXPbW1r++LUR6FwY2 2/Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=mUV+bvEQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b30-v6si13768764pgm.389.2018.09.16.11.53.20; Sun, 16 Sep 2018 11:54:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=mUV+bvEQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728401AbeIQAN1 (ORCPT + 99 others); Sun, 16 Sep 2018 20:13:27 -0400 Received: from sonic305-9.consmr.mail.bf2.yahoo.com ([74.6.133.48]:37585 "EHLO sonic305-9.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728333AbeIQAN1 (ORCPT ); Sun, 16 Sep 2018 20:13:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1537123774; bh=9YjMw12tbw7YqaqKwra2X7Q3ePUiT7BpqQBbuwaaWhw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=mUV+bvEQ2N2yRP1ek75tGSD50dRMStWiYyJ1zG+6VIDvAB+NwwjbIVOF8QTW60iOsVjYso1gsFoEoL9WoIMrjcXBZbD3iXrci7Bu60trkrEH6exMG4wDW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exiy0.opjZBglyc9sb.R7hb2Db5kIHIgk6qISkDQGxDfb1vBueBZAyLdZsTVZx0 jqwT6W8DQ8jzMtrUS3A60U2IkfcOPXyDXVWwC4dW6jU_BqwRSAUlXvahfidHTvRwCJyl55zLj4sJ rD_PRflGn4DgVuMvVsHnTJ1m6oVgcqSQIk98uMAQEIenu__LsMtvMfPeKWZ8TucKhQYkOMhOeoyj R8v_Hs03EcROQJJCWPQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.bf2.yahoo.com with HTTP; Sun, 16 Sep 2018 18:49:34 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.102]) ([67.169.65.224]) by smtp426.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 8264fe9faf49a75be875c1e190a9b9fd; Sun, 16 Sep 2018 18:49:34 +0000 (UTC) Subject: Re: [PATCH 16/18] LSM: Allow arbitrary LSM ordering To: Kees Cook , James Morris Cc: John Johansen , Tetsuo Handa , Paul Moore , Stephen Smalley , "Schaufler, Casey" , LSM , LKLM References: <20180916003059.1046-1-keescook@chromium.org> <20180916003059.1046-17-keescook@chromium.org> From: Casey Schaufler Message-ID: <84e1a5a8-8997-829f-cf09-1d29895a3f99@schaufler-ca.com> Date: Sun, 16 Sep 2018 11:49:31 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180916003059.1046-17-keescook@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/15/2018 5:30 PM, Kees Cook wrote: > To prepare for having a third type of LSM ("shared blob"), this implements > dynamic handling of LSM ordering. The visible change here is that the > "security=" boot commandline is now a comma-separated ordered list of > all LSMs, not just the single "exclusive" LSM. This means that the > "minor" LSMs can now be disabled at boot time by omitting them from the > commandline. Additionally LSM ordering becomes entirely mutable for LSMs > with LSM_ORDER_MUTABLE ("capability" is not mutable and is always enabled > first). Today if I have Yama enabled and use security=apparmor I get a module list of capability,yama,apparmor. With this change I would get a different result, capability,apparmor. I am personally OK with this, but I think others may see it as a violation of compatibility. One solution is to leave security= as is, not affecting "minor" modules and only allowing specification of one major module, and adding another boot option security.stack= that overrides a security= option and that takes the list as you've implemented here. An icky alternative would be to say that any security= specification with no commas in it retains the old behavior. So security=apparmor security=apparmor, would get you capability,yama,apparmor capability,apparmor respectively. Another option would be to require negation on the minor modules, such as security=apparmor,-loadpin I can't honestly say which I like least or best.