From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-f68.google.com ([209.85.161.68]:43786 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbeJEHBN (ORCPT ); Fri, 5 Oct 2018 03:01:13 -0400 Received: by mail-yw1-f68.google.com with SMTP id j75-v6so4548815ywj.10 for ; Thu, 04 Oct 2018 17:05:14 -0700 (PDT) Received: from mail-yw1-f44.google.com (mail-yw1-f44.google.com. [209.85.161.44]) by smtp.gmail.com with ESMTPSA id 138-v6sm3081936ywj.11.2018.10.04.17.05.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Oct 2018 17:05:12 -0700 (PDT) Received: by mail-yw1-f44.google.com with SMTP id q129-v6so4544804ywg.8 for ; Thu, 04 Oct 2018 17:05:11 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20181002005505.6112-1-keescook@chromium.org> <809f1cfd-077b-ee58-51ba-b22daf46d12b@tycho.nsa.gov> <5955f5ce-b803-4f58-8b07-54c291e33da5@canonical.com> From: Kees Cook Date: Thu, 4 Oct 2018 17:05:09 -0700 Message-ID: Subject: Re: [PATCH security-next v4 23/32] selinux: Remove boot parameter Content-Type: text/plain; charset="UTF-8" Sender: linux-arch-owner@vger.kernel.org List-ID: To: James Morris Cc: John Johansen , Jordan Glover , Stephen Smalley , Paul Moore , Casey Schaufler , Tetsuo Handa , "Schaufler, Casey" , linux-security-module , Jonathan Corbet , "open list:DOCUMENTATION" , linux-arch , LKML Message-ID: <20181005000509.OJ9_N8iepkp2D0NlqThacen8yqyPA0tIksQ3gf-7ig4@z> On Thu, Oct 4, 2018 at 10:49 AM, James Morris wrote: > On Wed, 3 Oct 2018, Kees Cook wrote: >> Then someone boots the system with: >> >> selinux=1 security=selinux >> >> In what order does selinux get initialized relative to yama? >> (apparmor, flagged as a "legacy major", would have been disabled by >> the "security=" not matching it.) > > It doesn't, it needs to be specified in one place. > > Distros will need to update boot parameter handling for this kernel > onwards. Otherwise, we will need to carry this confusing mess forward > forever. Are you saying that you want to overrule Paul and Stephen about keeping "selinux=1 secuiryt=selinux" working? >> CONFIG_LSM="yama,apparmor,!selinux" >> >> to mean "put selinux here in the order, but don't enable it". Then the >> problem becomes what happens to an LSM that has been built in but not >> listed in CONFIG_LSM? > > In my most recent suggestion, there is no '!' disablement, just > enablement. If an LSM is not listed in CONFIG_LSM="", it's not enabled. And a user would need to specify ALL lsms on the "lsm=" line? What do you think of my latest proposal? It could happily work all three ways: old boot params and security= work ("selinux=1 security=selinux" keeps working), individual LSM enable/disable works ("lsm=+loadpin"), and full LSM ordering works ("lsm=each,lsm,in,order,here"): https://lore.kernel.org/lkml/CAGXu5jJJit8bDNvgXaFkuvFPy7NWtJW2oRWFbG-6iWk0+A1qng@mail.gmail.com/ -Kees -- Kees Cook Pixel Security