Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3205619imj; Mon, 11 Feb 2019 16:09:23 -0800 (PST) X-Google-Smtp-Source: AHgI3IbMwFQ+JTY1pRaUakRYV+LBk0eNffU6XNs+5OMVPWIpXFXTkgDO/rK8oMMfasaB5QW0Dr5k X-Received: by 2002:a63:c0e:: with SMTP id b14mr918171pgl.236.1549930162959; Mon, 11 Feb 2019 16:09:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549930162; cv=none; d=google.com; s=arc-20160816; b=ax1hhV08wzO0T6UVR6ryy0dI9cN9bsixhId0blnZlVWP+u08q1rQElbxlkI2oeJ2mA PFUL+QmE06OtexY3SGPsf5m6Om3JQf9SE7fYA6EAtq5J6sJCbdpcysIDngaKxhoYb8Rx K54zPbodbECCBFJQkn+EdYpjCwub8oFdq/8LIFWUik6Y7OAQHY4jbKMU4KZEI4IB8ptW gkm3b6OlhBZzbRca9JfV/JsTNLkQ57KLN95CyRsZpmySmRpIcmjnIqRC8HqAPrgTMFFY 9D43C5zcoAwlW4cVK4Lni7nFYMmEhgVSmH2g71sPsVxsApuLSEWOPCtcrO/16KmIv7dG M69Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=sa3y338Wq9poiwY4rypOZvc5Wi2KH3ZGIw6/C6NuUsc=; b=S34EIvEbpgcJUh7S7X0REdrWzLYI1rbm526jTO1kVOM4sXFEziG6dARScUYtDlxQ6F cImvgPYVzUyfE9qfDTeo5Ruu8r9pozVLe9+uDP3YncTzvtlSmL2HOoJgOE/DZ8qyoaTO JEFBi/+euk7WMKWrvcY4R+013RFAi7lX8WVyoVNfwczf2SWSbf6C+7gkGrgh7or91qjI QxrxVz16eviJRdIz+DnswUml8NEN74HiXgMnNVFTLXcDXrBdJGeq9ZDT9izuT57cEUEv iQ8w5HgGzHwhU8vaNrvjPt2Xc/2G7PDzfswBXJFg90z84jNMs04QWWSv7sQIF8+GItLP mOkw== ARC-Authentication-Results: i=1; mx.google.com; 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 y9si10127742pgv.134.2019.02.11.16.09.06; Mon, 11 Feb 2019 16:09:22 -0800 (PST) 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; 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 S1727801AbfBLAH1 (ORCPT + 99 others); Mon, 11 Feb 2019 19:07:27 -0500 Received: from namei.org ([65.99.196.166]:51674 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727256AbfBLAH0 (ORCPT ); Mon, 11 Feb 2019 19:07:26 -0500 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x1C07I2V020437; Tue, 12 Feb 2019 00:07:18 GMT Date: Tue, 12 Feb 2019 11:07:18 +1100 (AEDT) From: James Morris To: Kees Cook cc: Casey Schaufler , linux-security-module , Tetsuo Handa , LKML Subject: Re: [PATCH] LSM: Ignore "security=" when "lsm=" is specified In-Reply-To: Message-ID: References: <20190211225403.GA7769@beast> <74310e83-a258-e9c0-7d98-8b2cc5ced3a4@schaufler-ca.com> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Feb 2019, Kees Cook wrote: > On Mon, Feb 11, 2019 at 3:10 PM Casey Schaufler wrote: > > > > On 2/11/2019 2:54 PM, Kees Cook wrote: > > > To avoid potential confusion, explicitly ignore "security=" when "lsm=" is > > > used on the command line, and report that it is happening. > > > > > > Suggested-by: Tetsuo Handa > > > Signed-off-by: Kees Cook > > > --- > > > security/security.c | 8 ++++++-- > > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > > > diff --git a/security/security.c b/security/security.c > > > index 3147785e20d7..e6153ed54361 100644 > > > --- a/security/security.c > > > +++ b/security/security.c > > > @@ -288,9 +288,13 @@ static void __init ordered_lsm_init(void) > > > ordered_lsms = kcalloc(LSM_COUNT + 1, sizeof(*ordered_lsms), > > > GFP_KERNEL); > > > > > > - if (chosen_lsm_order) > > > + if (chosen_lsm_order) { > > > + if (chosen_major_lsm) { > > > + pr_info("security= is ignored because of lsm=\n"); > > > > This is a little awkward. How about "lsm= supersedes security=". > > Fine by me. James? What would you like here? How about security= is ignored because it is superseded by lsm= ? -- James Morris