Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2607imm; Thu, 4 Oct 2018 21:59:04 -0700 (PDT) X-Google-Smtp-Source: ACcGV639WyYFwwTQTfeH4FUCS7rOxibJ+6CL44VXgfMa60ZOaSouJ3pPJZ+36TuoBDTEl/S25OkD X-Received: by 2002:a62:3942:: with SMTP id g63-v6mr10386488pfa.170.1538715544788; Thu, 04 Oct 2018 21:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538715544; cv=none; d=google.com; s=arc-20160816; b=G+AgGV9n3MqsyphkaBjI7LWrq+hZzyZOuFpz0pGtA/vWk1eifZgzNtP4DtvmuraVzV YR4Eucqeqoq19F4mMAMAl9DrmCKbWa5ow0WYE5P61w0LvG4xln70mzsdE4Fd6ulpb2Nw 2IEOxbG/3CkFxqLgLmJLk6m6H4DRg6K0ByjwfR5de35wOcyBij1wVVlvfdaq4gYwzdOm IUVpk4AdBC8/1HR6s/RrfC4hfNrUOlAn1PTiHMyAXLiE29cz2k2HA2dIwUr8hhMPJwdl cV+6ilx5xHT9PkUUOnYGTX9b6vnvCHEOAvoPc3LxeBUJ8rKdr+2p5MXGmdYuOV6+BLWg vLaQ== 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=EuFClJLTJal0fKkVuof2rlx29uZrz6U4ix6d+e0zGjI=; b=BzEaL9EC/cFtCGfCpAgdkXu4lVi5ZQtROqPBPl9qcRer/OY7Ti9AVMUyluHefkKWGD xOwvYrG54zdbQdpUNobPANZSQ83oTQN95033uvhaC61YBHauJ7IPv9ss4++k8dKlZN8K 1ZEH8OwzrSTbi+wuB+N4ZkehH+P0TUj+0m+wyubBkMR131vRBtonWIFKaSihQa4Tf4RL u02EXggdq/2JLEHYQv5fVA6UmUlL/e9id9eT6MKN6FnyG4W9O1glSiIbvjji1Bgt1I2s iKEzkN40H8igqGgh7xtJq1ve7LHySKU7+km6UisamAwRiftdPzkBz5n/icelnMw2qliK YSYQ== 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 f1-v6si7624686pld.419.2018.10.04.21.58.48; Thu, 04 Oct 2018 21:59:04 -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; 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 S1727302AbeJELzm (ORCPT + 99 others); Fri, 5 Oct 2018 07:55:42 -0400 Received: from namei.org ([65.99.196.166]:35746 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726939AbeJELzm (ORCPT ); Fri, 5 Oct 2018 07:55:42 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id w954wDR7011060; Fri, 5 Oct 2018 04:58:13 GMT Date: Fri, 5 Oct 2018 14:58:13 +1000 (AEST) From: James Morris To: Kees Cook 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 Subject: Re: [PATCH security-next v4 23/32] selinux: Remove boot parameter In-Reply-To: Message-ID: References: <20181002005505.6112-1-keescook@chromium.org> <5955f5ce-b803-4f58-8b07-54c291e33da5@canonical.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 Thu, 4 Oct 2018, Kees Cook wrote: > 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? Not overrule, but convince. At least, deprecate selinux=1 and security=X, but not extend it any further. > > 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? > Yes, the ones they want enabled. > 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/ > I think having something like +yama will still lead to confusion. Explicitly stating each enabled LSM in order is totally unambiguous. If people are moving away from the distro defaults, and there is no high-level interface to manage this, it seems to me there's a deeper issue with the distro. -- James Morris