Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp657166imm; Fri, 5 Oct 2018 09:35:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV60jJxgjJfdU617sSTVt7zDA9cM5d50UTO7/GLEl9+fB4ItoNR/Pmc9Q/yKTubAN3IMXXmc4 X-Received: by 2002:a63:1302:: with SMTP id i2-v6mr11112602pgl.380.1538757357376; Fri, 05 Oct 2018 09:35:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538757357; cv=none; d=google.com; s=arc-20160816; b=E/JwLNFZ9zLW/Z0FmdLzMoOVsR1RFo3cYz/TxJOJIe0DNRwnPx2CzhExjg+mke0x7L M3zI6DrRbWoIjgpT7gEA9sMrQzymBG6OUZLuUFqO7YE3CnIPGZRTNCmHdR/UtVI8c+vb /zcXBsJSHhpiXSS7B4E0Bz4UaKEnpjZmlsW+1v7uzYuuDPe6tNe/2PKSiAURbykYvk0z Zqk1ieFopkQeIbgyVRHxr1jYwkKwvp2iuSMmLfRY9Y4FBQu3arx8o8tjgPd9KbPlybrq 6eU0HocvL+XO2+xQQnA3Qanp2oKKzkXTaMPe4CQ+EJwV7DEDIJNHyLtN1YLO8yNeTY38 mgFA== 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=4vcOWcGFWjgwlB0xk/o4LvAQ9uGCBIWBW8bUlhArKxU=; b=sbstC9pbDxtUTdjuDca9jC4LFQSFpFrKStStwkYKb1XXdDLjJzyHwG35VYZzCOl3tp I8Unbef5ig0MYwkD2jD/NLzhcLn9A/8kRQZVDdDQD9jKHqVtDYaN7gEqpCEsa94mpQVh BUWxfzaqTpibz4ju5+fQB+WfqLSJUammye2CeklIY/bEWf8DbMbSgxlThX7+MuMzUtyu /qMZi29Axq/PJ9LypOgzpCjvL24W4L8LhOfThX7Tjiw1zY0n3pJ4K5swny3UXZRkEbPK /H2Vnj60DeUjnWt05cRaNfpCLaJVKFzu66hsSEM2udEinLNW06d7y4iNlrNH1kXjHvAt mDvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iYl9ls4D; 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 n10-v6si8353549pgj.165.2018.10.05.09.35.41; Fri, 05 Oct 2018 09:35:57 -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=iYl9ls4D; 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 S1728479AbeJEXfC (ORCPT + 99 others); Fri, 5 Oct 2018 19:35:02 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:44221 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727572AbeJEXfC (ORCPT ); Fri, 5 Oct 2018 19:35:02 -0400 Received: by mail-yb1-f193.google.com with SMTP id x5-v6so5655742ybl.11 for ; Fri, 05 Oct 2018 09:35:33 -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=4vcOWcGFWjgwlB0xk/o4LvAQ9uGCBIWBW8bUlhArKxU=; b=iYl9ls4DIMiAVy/svw/tu2nJffUBabsYRHkJjIKrCmMrnkikCXUQ6h7qei1J04PiMm OIDae3hqgGHc824Fhj41m83Qg58istTGaywFs254LeSNbMmatmF4uYFTzCXBGgQuaPem jh4hDDV64YjLpVcPdy+/j8DAzS5xJmlJ1Rj9o= 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=4vcOWcGFWjgwlB0xk/o4LvAQ9uGCBIWBW8bUlhArKxU=; b=gYToK/HmUeVI+zHlJ5MpkqBw7Wjah4xBxAK8NaBed8THj7idhViFi8YNKz9BQiSF08 KKY1UhfNvbTjhbvrKIcN9V7PojiGTM3DZKGAcD+r3Ru7PNPJzZ3yw+Vw3Z8rOLH0N5PZ v0Jt0x3Y37Jt5ac3ivivFRMGM4RnnzbEhDi4Kzi0m/w6glLogoOIL9YxpvsmoZn/NGt+ F2VNIZmeTPJckHJN9Bwi3C8pkjEAUibJbghhG1ZesNVsxIT+guIBj5wetIh+4hRArSLF 6GOYcB+jZdDqDnM9/Azoiije+pILAyTbYPQ0iGehJw5O4NldRanPBORBNmZu73IUNtrH Iccg== X-Gm-Message-State: ABuFfoguSuhGQq1js9hLbH+Xg7pBJQv9ELZkC/zcffVcIyliixbCCbAK /2LAdvvumGLhGFhJraxLSbpsi8tpnLo= X-Received: by 2002:a25:a4a6:: with SMTP id g35-v6mr6824777ybi.56.1538757332914; Fri, 05 Oct 2018 09:35:32 -0700 (PDT) Received: from mail-yw1-f50.google.com (mail-yw1-f50.google.com. [209.85.161.50]) by smtp.gmail.com with ESMTPSA id u22-v6sm8855244ywu.49.2018.10.05.09.35.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 09:35:30 -0700 (PDT) Received: by mail-yw1-f50.google.com with SMTP id y14-v6so5480657ywa.4 for ; Fri, 05 Oct 2018 09:35:29 -0700 (PDT) X-Received: by 2002:a81:98cb:: with SMTP id p194-v6mr6744281ywg.353.1538757329237; Fri, 05 Oct 2018 09:35:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:d116:0:0:0:0:0 with HTTP; Fri, 5 Oct 2018 09:35:27 -0700 (PDT) In-Reply-To: References: <20181002005505.6112-1-keescook@chromium.org> <5955f5ce-b803-4f58-8b07-54c291e33da5@canonical.com> From: Kees Cook Date: Fri, 5 Oct 2018 09:35:27 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH security-next v4 23/32] selinux: Remove boot parameter 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 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 Thu, Oct 4, 2018 at 9:58 PM, James Morris wrote: > 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. Okay, this is the expectation from me as well. I think my series makes it work as-is with the new stuff just fine. >> > 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. Okay. I will adjust the series and send a v5. -Kees -- Kees Cook Pixel Security