Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1556174imm; Tue, 2 Oct 2018 10:03:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV62Is7inyrwlyO9AezChWVIKFqnV0AZXefQH+PwjGeYj7SWwIyqZRKmgQj3LgXEnA3whdEvq X-Received: by 2002:a63:904a:: with SMTP id a71-v6mr15470417pge.264.1538499801056; Tue, 02 Oct 2018 10:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538499801; cv=none; d=google.com; s=arc-20160816; b=N+5SvrfFAh3XCxB61HvEuEwlYkVn7Yf3Q2VgI809NcP3MOOswgJhrPFq3Km8VhH9c5 jNWZfethl/x9G0uHUl1bNhmcoE5itda6WezeeIx02LRPymCAJALVFTiRmhokaMJcwhdq gOMHDREOIETgAxLlt9rDkR6xH4+w1jQvyrZnBv+VwleYPLGEN9hSah4a9UnLj0OMmY3H +XlEG1ZrWGj+xpVcidEIJmvq5S7dugo6q3NaS96GRlE4CbAYwT+Pe1dMmmZlLsU/IqAL 2Ltos/H60Xrlu0cqXe+kJD0R1Y55tSylkhPlL7ZCR5uaSSW5ByBB9fvWjvuVvo17hfgB hV7Q== 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 :references:in-reply-to:mime-version:dkim-signature; bh=3KjyMR08bmd9YZmum53kS/V/XW07F6Rp6ifIGqpPh2M=; b=rNBVrsvGYkaF9l+7/xLhmDALL3XY4JJmo+Zv42e0tOxcfLIEgumxOt4kzU/aYd5suL jPz0FICzWO6YH3GWww00t2VWDGZR77S9N1s78hn7w0KhiAUdM1ZPGFJ0MJumnQzkVrPl Ae6w1AVii747HndHvoD80bFLrdU1fG0PfnEF0uiEed1KNeSLJczqdBYSY1CJLHWTlJHR Cs2n6v0MjiNaZByhJ8MEmn1oouUTZ4bN1uEB5P/wQzPn8DVfft9NvdoR5UAzvPfdyBQf C6mfgxM4B5frgu9zUy7tfvFbsYTILBGLtdI9eU90xAVDkrZEl1E5UxnVqCz+edygpY2x 5LGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AuCTrPWP; 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 p81-v6si13926845pfd.76.2018.10.02.10.03.06; Tue, 02 Oct 2018 10:03:21 -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=@chromium.org header.s=google header.b=AuCTrPWP; 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 S1728357AbeJBXia (ORCPT + 99 others); Tue, 2 Oct 2018 19:38:30 -0400 Received: from mail-yw1-f66.google.com ([209.85.161.66]:40722 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbeJBXia (ORCPT ); Tue, 2 Oct 2018 19:38:30 -0400 Received: by mail-yw1-f66.google.com with SMTP id l79-v6so1036050ywc.7 for ; Tue, 02 Oct 2018 09:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3KjyMR08bmd9YZmum53kS/V/XW07F6Rp6ifIGqpPh2M=; b=AuCTrPWPVkjdDsflK4b3v5Nu5F/wwaZZXIByGqgI4xNRRHvWAYxNTFlAZcADMZCmiK NQJOPjWhluzj0VV4MUcGKvZKg4vjuWEs+7asTr7PD8ZltruGrOB0CBGbCVWuvc5q7yYd KZWRcJ2X1SYMqNEa2sf+yZh7xIBMqw4pgbv08= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3KjyMR08bmd9YZmum53kS/V/XW07F6Rp6ifIGqpPh2M=; b=g1w9YR2Tgfjhbc+wLtB1gHC5kGqZmqj4bYz8EJm7RTlGLute6cN5mlG8+AXEPY8yLF w01Dvhbw/pDn0Ff7mLSzQZ6tdwJ+QyP5rdA+1NWtfnA66Nthw0uPHQXrF/JGQf2sipuc QgA7PPhla45vcVqAXszW8m00V5CtFtGtgfiQvAyXEGwV/G491XUXCwpyp75D57drE/+K sAk0SXamYIROc3VGVcc43BC9zNoHKf+Wgo8NeF40NmbeGfI7sYEREAiEULZsIoJu2f6j QC0KO8p9CxkRe3Tz9ZOLjIQ0/V0L8dQxXpBCXaSKrDWJCmL3PfPYF5uBPqrbOOFmMmfA 7vmg== X-Gm-Message-State: ABuFfogZ1kZ0OgeV/719b5CGC/8Vl3I6QLzHTrJfH64hyT/8YTeVi2wD SwTvKwITNh/2JDe5VljJVJi/jHd4DRI= X-Received: by 2002:a81:2d89:: with SMTP id t131-v6mr9053499ywt.222.1538499250693; Tue, 02 Oct 2018 09:54:10 -0700 (PDT) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com. [209.85.219.172]) by smtp.gmail.com with ESMTPSA id f194-v6sm7649840ywb.53.2018.10.02.09.54.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 09:54:07 -0700 (PDT) Received: by mail-yb1-f172.google.com with SMTP id u88-v6so1087163ybi.0 for ; Tue, 02 Oct 2018 09:54:06 -0700 (PDT) X-Received: by 2002:a25:3588:: with SMTP id c130-v6mr7666980yba.410.1538499246259; Tue, 02 Oct 2018 09:54:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:d116:0:0:0:0:0 with HTTP; Tue, 2 Oct 2018 09:54:05 -0700 (PDT) In-Reply-To: References: <20181002005505.6112-1-keescook@chromium.org> <20181002005505.6112-24-keescook@chromium.org> <785ef6a9-ae46-3533-0348-74bcf6f10928@tycho.nsa.gov> <809f1cfd-077b-ee58-51ba-b22daf46d12b@tycho.nsa.gov> From: Kees Cook Date: Tue, 2 Oct 2018 09:54:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH security-next v4 23/32] selinux: Remove boot parameter To: Jordan Glover Cc: Stephen Smalley , Paul Moore , James Morris , Casey Schaufler , John Johansen , Tetsuo Handa , "Schaufler, Casey" , linux-security-module , Jonathan Corbet , "open list:DOCUMENTATION" , linux-arch , 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 Tue, Oct 2, 2018 at 9:33 AM, Jordan Glover wrote: > It's always documented as: "selinux=1 security=selinux" so security= should > still do the job and selinux=1 become no-op, no? The v3 patch set worked this way, yes. (The per-LSM enable defaults were set by the LSM. Only in the case of "lsm.disable=selinux" would the above stop working.) John did not like the separation of having two CONFIG and two bootparams mixing the controls. The v3 resolution rules were: SECURITY_SELINUX_BOOTPARAM_VALUE overrides CONFIG_LSM_ENABLE. SECURITY_APPARMOR_BOOTPARAM_VALUE overrides CONFIG_LSM_ENABLE. selinux= overrides SECURITY_SELINUX_BOOTPARAM_VALUE. apparmor.enabled= overrides SECURITY_APPARMOR_BOOTPARAM_VALUE. apparmor= overrides apparmor.enabled=. lsm.enable= overrides selinux=. lsm.enable= overrides apparmor=. lsm.disable= overrides lsm.enable=. major LSM _omission_ from security= (if present) overrides lsm.enable. v4 removed the per-LSM boot params and CONFIGs at John's request, but Paul and Stephen don't want this for SELinux. The pieces for reducing conflict with CONFIG_LSM_ENABLE and lsm.{enable,disable}= were: 1- Remove SECURITY_APPARMOR_BOOTPARAM_VALUE. 2- Remove apparmor= and apparmor.enabled=. 3- Remove SECURITY_SELINUX_BOOTPARAM_VALUE. 4- Remove selinux=. v4 used all of 1-4 above. SELinux says "4" cannot happen as it's too commonly used. Would 3 be okay for SELinux? John, with 4 not happening, do you prefer to not have 2 happen? With CONFIGs removed, then the boot time defaults are controlled by CONFIG_LSM_ENABLE, but the boot params continue to work as before. Only the use of the new lsm.enable= and lsm.disable= would override the per-LSM boot params. This would clean up the build-time CONFIG weirdness, and leave the existing boot params as before (putting us functionally in between the v3 and v4 series). -Kees -- Kees Cook Pixel Security