Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp20509imm; Thu, 4 Oct 2018 17:05:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Ak1VB2dgKhlwVniKRJ9aU2m1E3KzQWq32xee8ELJblMcOfxqxRQDClJY0sgivoQqqu3OJ X-Received: by 2002:a63:f744:: with SMTP id f4-v6mr7860706pgk.410.1538697941780; Thu, 04 Oct 2018 17:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538697941; cv=none; d=google.com; s=arc-20160816; b=gnJQ0y1K3y5ZIthbE46noloOk6oXhFtPtpLaO6Hy+7waNAF0HfZdcezYjs00NDMdg1 OZOqnXnkC607mRdTBv/eQp8UrND8LP2KVM1CvIQK+gydAK4By8D5TgtKkDuj91h4KTmF 8NmQwgFz+Kmyzwrzy5aOqMAaUBZBskCHbWAzdjL1J4+bm3TqprwqDSOsHGnoH/Ek3rPe i9lNNphAcf5M0G6nPGEcw8moOWmw/BcEJfrFjRqpLd2lGcAPWGwxnq7nSmJiRjoY1BZi u3OhP+zDpk9203gRiB7X3G8Vm5HW++uGzYwd6I1orOX0OqqXJzQoYr02Dxer7D1jAZ5z kGTQ== 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=YiS6kj9F/mIyeBOtensRm7BthCtrk4+9vKJ/9TOUD60=; b=LpD3gECe0qGVPs0A/Xs/rPaYCnRLnL6gBUyjv0nM+3KJbAHLJa3FWC+u3grRTDwxAM KUszsahQtt/Iaj1+oK92t79JJsrJSRFREMNCnGW7oggPLq4Z6LTvnWnVek0B3AcYNaiO Y+uGFJ9vF9yQPUGX80dLZ4TogdjMFw9w8bRKHeZDG1MLl+eYv3REs38Tjkqzi45TewyH bJY76ZCNee3RPgNWG88XIawCgBCp34kQJCQsvpSqeCaH7XaCg87aYJCkHoe8z4C/DzJ6 kugt8qxkx1+El3c78MyhrYQe60GWAY+Nh/CP+q7fJo5Stqpcwc63AiovtvUEn2CnUmUX 2ANA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GbYgaM6t; 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 w4-v6si6523375pll.214.2018.10.04.17.05.23; Thu, 04 Oct 2018 17:05:41 -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=GbYgaM6t; 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 S1727107AbeJEHBM (ORCPT + 99 others); Fri, 5 Oct 2018 03:01:12 -0400 Received: from mail-yb1-f196.google.com ([209.85.219.196]:38700 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbeJEHBM (ORCPT ); Fri, 5 Oct 2018 03:01:12 -0400 Received: by mail-yb1-f196.google.com with SMTP id e190-v6so4717622ybb.5 for ; Thu, 04 Oct 2018 17:05:14 -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=YiS6kj9F/mIyeBOtensRm7BthCtrk4+9vKJ/9TOUD60=; b=GbYgaM6tlQBZk15VYd/sqf+K2Qj/m520UDDBw1ouQtrHOvIXvKKAZAqtK6gGMKRyjy 8ACXz5k6EtIgHbz8htcPdTl5zC03k4zH+fkxIITYLkEIxJHRSVHoKKaEr1QiNpXU3fLQ NVAgoTILmiueYDi7gnJwmTENx/oErMyyo12AQ= 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=YiS6kj9F/mIyeBOtensRm7BthCtrk4+9vKJ/9TOUD60=; b=tyjRZqinf+v77fblwtVFsuZlZ9nijbUrHPA2Ki22KbzEPzcl3QskWABxGRXhxiq2zP BqlN7ZN7d64AUtjI8AD4sr9N5rfb9XZi4pTboMxkt0Z96Ty5Vcg1EeI3+5sCvS67SB0o SQK2WcoyJEhYokbgskTuJmpLJlwQiW+NcXxmmLjG95kbissj4yQtB4KHL0/Esyndw31A SE7BOFvOI3EC++lSvaePYAaRotvYKS4/kdHQZjbq7xqtiYlH3G7x6UmrAC6fjV614VEu XqrZx0h9EIV3ZBkQJhgBAk5HG5L2Q7F6lKMmkvaGv/MDDtRsj7nmXKTvlWFuAW6GcRIV UZjw== X-Gm-Message-State: ABuFfoijtitCbMWxL/HWTjVkYtAnMBKkjl6RHpUw2fHDZ18iq3oBxpcJ cj1TlcicMFQjSL97PQZ+NSrHh6vPimc= X-Received: by 2002:a25:d305:: with SMTP id e5-v6mr5224663ybf.514.1538697914049; Thu, 04 Oct 2018 17:05:14 -0700 (PDT) Received: from mail-yw1-f42.google.com (mail-yw1-f42.google.com. [209.85.161.42]) by smtp.gmail.com with ESMTPSA id h10-v6sm2280736ywa.35.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-f42.google.com with SMTP id y14-v6so4553793ywa.4 for ; Thu, 04 Oct 2018 17:05:11 -0700 (PDT) X-Received: by 2002:a81:98cb:: with SMTP id p194-v6mr4982145ywg.353.1538697911394; Thu, 04 Oct 2018 17:05:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:d116:0:0:0:0:0 with HTTP; Thu, 4 Oct 2018 17:05:09 -0700 (PDT) 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 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 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