Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3165962imj; Mon, 11 Feb 2019 15:19:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ9XMQgHKbrRiSIUvI74i3gzR9wd+Oz33+1nYSeXzOCy8BVuyY8uwltpSAwejkPn9QjKaDg X-Received: by 2002:a62:a510:: with SMTP id v16mr815393pfm.18.1549927169365; Mon, 11 Feb 2019 15:19:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549927169; cv=none; d=google.com; s=arc-20160816; b=bzhwoYTK+qQJ5n80MosR/fd3p/YiCOEdOAfvAozfN4XPOfue6veLOIgF0+nrKcyQ30 SNxXOJUpj8hCHWaKllcgN4HKVWWk2ZmzTiZcGywz40kJ+W2fqM9JEoq7OK32lzAs+F6v DBNlVb53X0abfi/bjLqRcOAIeF7maih4keuJ3Fl26Nai+zvb92lp2YkC7toMKC3pAsB/ Nqido9qv416U0aotZEKw6UmsgyI5Ja1O4LB5Ury8m5Xg/Bc8+LuE/TKmNAe5O2BY/IFA DdZRayDCLLr+rjSch+vQkA8g0PqeOy2Qc7SOgZkYDl/+7DmbmcpYHp45f+uErgL9e46n 9RKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6Qz8ODHkzIZKJF9S1SR/qImm6fQJbGaGKVmJiMCoO3Y=; b=TPPj4vz/SmirwvSkKivOKN4eVWnJNWnrT0efklLCIBxXZbGCLJ/IfF3hqLaHoYBeP4 4MpjB0sORc80fiknwYknrAg3N5pi1YWT0ncM4KOFLH4hje9DFlO4YFxQuNfqbAdXrkYp Ya5n2YTIEowl6zCoUsyu2uIOT2ninqTOcPm8tWMtLAYNmx6+sEAE1wB8EIqIEM+XAXAc D+DXmUfJMvZXtygbpv2I65Qki15/9+Y8NfxbFsnOFbt/o2KP2TSvQ2/y4OYXuv5sTsD/ WeRW/sDzTu5I2hNFaxn64DQrpc/g0bbinB9Xq4uNVoCdmpStqwBOzpeB5GxLqYkBmWSK DqHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PiojzZ6p; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si10546226plt.98.2019.02.11.15.19.13; Mon, 11 Feb 2019 15:19:29 -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; dkim=pass header.i=@chromium.org header.s=google header.b=PiojzZ6p; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727639AbfBKXSX (ORCPT + 99 others); Mon, 11 Feb 2019 18:18:23 -0500 Received: from mail-vs1-f67.google.com ([209.85.217.67]:33202 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727052AbfBKXSW (ORCPT ); Mon, 11 Feb 2019 18:18:22 -0500 Received: by mail-vs1-f67.google.com with SMTP id k11so465941vsm.0 for ; Mon, 11 Feb 2019 15:18:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6Qz8ODHkzIZKJF9S1SR/qImm6fQJbGaGKVmJiMCoO3Y=; b=PiojzZ6pT87KyLWfn4wr2y+PjdwzlG0xh9ULcIgvSW1hOUvDZc9wsK6NvUYtAtJtOp T0g8tV3d2vtfpAyhG6RaLiAwI3Z4xrmmmhEJvTAjrRxEk1/oDWWIZ310t2uynvXqFjMh z36iA/akXMaLofWmZB7pEz79rwrXKXziMlPlQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6Qz8ODHkzIZKJF9S1SR/qImm6fQJbGaGKVmJiMCoO3Y=; b=LQV1Ltjd/Fig6EXXyGrWG2viqMH4pFtK6JooXd1BSlSS6wOIM/2oXjkkQJV9/gdngw /ZbeHS337+UNAAZjgRnMngSu4yJee8HpstLIekZOH9S/SAbJT4aQ//WF7hxuRgpvW9Ba Ez+iJT78xGMUYLuxCql9efjIHpr7dbqz57UYiKcGgx3nPdrQsRvkcUprsGEfTJGRcca9 fdpObusuI+vWBWULE6+4qbCLs+hOrGT5dukQpLlKkWKuZf5dtNB3WxgVDprh0c1Zaknt zbhw9ABjvc0VuIHDnUxGYSFtkjDKc2akkkhVZLbiKUGgg/J/3RfcsY/DijBbJ3QlI1Ae un0w== X-Gm-Message-State: AHQUAuaepx1VrKsPrsM2+ih7vR7L3raHxqc0T2xSoIGoNViAC3E0XTJp hN9jF2Y7U5T8n7lNSkVfmAhof0y8G/g= X-Received: by 2002:a67:7848:: with SMTP id t69mr295258vsc.211.1549927101083; Mon, 11 Feb 2019 15:18:21 -0800 (PST) Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com. [209.85.217.48]) by smtp.gmail.com with ESMTPSA id l10sm12324456vkl.54.2019.02.11.15.18.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 15:18:20 -0800 (PST) Received: by mail-vs1-f48.google.com with SMTP id n10so412054vso.13 for ; Mon, 11 Feb 2019 15:18:20 -0800 (PST) X-Received: by 2002:a67:7d01:: with SMTP id y1mr338916vsc.48.1549927099716; Mon, 11 Feb 2019 15:18:19 -0800 (PST) MIME-Version: 1.0 References: <20190211225403.GA7769@beast> <74310e83-a258-e9c0-7d98-8b2cc5ced3a4@schaufler-ca.com> In-Reply-To: <74310e83-a258-e9c0-7d98-8b2cc5ced3a4@schaufler-ca.com> From: Kees Cook Date: Mon, 11 Feb 2019 15:18:07 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] LSM: Ignore "security=" when "lsm=" is specified To: Casey Schaufler Cc: James Morris , linux-security-module , Tetsuo Handa , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Kees Cook