Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp735653imm; Mon, 1 Oct 2018 18:18:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV60xJdJn4thoJQHJkWYoWO1YtP+8daRNra41jM18W2Bo3ykvvtqGoX24JzBmjpLktmctdErC X-Received: by 2002:a62:1d16:: with SMTP id d22-v6mr14030214pfd.159.1538443137674; Mon, 01 Oct 2018 18:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538443137; cv=none; d=google.com; s=arc-20160816; b=EA9v83hZnahjSgBlS6hkNDvpNoVe1GGZQS3U/v0BhIJ4YKAou/Q/yDXWrxiPRbrojR 74hW0UdBSW1571K3IK/11IlJaGHvWnEJkW+AJWsU54AcT06liXzP14OKAkn1fSTT7drT RDbXP87fHCgCuDA4GrXBJEM7jIyLGNVC9O/bu0NGZ8TM8DzgHXP9EofzNsrhIP7+Q4kB DwToJUJzD9HDNkEc/gNQ8fQMTFI7EUfWwKnSzkDD8yPf98VcXIgOwzzjW8EFkpORmrNT gR8vSUmcdknD2n5vMsyVUQyeG9xJmQQC6x4Ualelbc9cDz8qw+XZe4Th15eybFHMMB6A PhdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=2+6QRyaExpmbMF1OBAJxYq0QCbbA9YE2015ccebeU44=; b=IlKRjRVwR9WMM7eHD8zNrf74HLuz7OV5L3swvPqfEnHDjtcjVAEGugGXp3qGvSWRgg GmA18tmnnzbOWBZz+W0/0KlgjiTQboFOqI8Eid9ie9oAYK92vj3mLedsUCq8l1oulOiz O9eQQ1vc1sFu7ACunIJxtS6NzclLSVMeUq9JlWsLFFuXVE1aT6rSW2CMv4DYlybekuNe Qj9+vTC4pJDHAr84Xi1pNrjHEeLMNsaG9uCv24nCK+GJHlbjpXvui/Uury22TvgsdV2P DVjvCzd1lr3lfqlccttzg50FrjTfhmzK3S2KahA3NgZ2BjTN9K+Sj9k2RAE9AoM6Ab65 y08w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ql6Xco9D; 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 u64-v6si13564901pgu.533.2018.10.01.18.18.42; Mon, 01 Oct 2018 18:18: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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ql6Xco9D; 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 S1726796AbeJBH7M (ORCPT + 99 others); Tue, 2 Oct 2018 03:59:12 -0400 Received: from merlin.infradead.org ([205.233.59.134]:45160 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726304AbeJBH7L (ORCPT ); Tue, 2 Oct 2018 03:59:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2+6QRyaExpmbMF1OBAJxYq0QCbbA9YE2015ccebeU44=; b=ql6Xco9DTNdBdtEXxiMYfDeh0s 5cNkCkiol8eatfF57PTyqPKWsON3d5iRF4qd0G9KzNxgHNVk9GrUKLn3EWZftTBhFK6wBtvCPXxpb gHCm92zbjWxNeXrZmYHHOe/QmZ/n8UdSAJ1s5kFaUCdLbN6IAQ9EHxbHagiG9a9rHPlHpo9YU/rKy Y9fcDgxTgvmq14aEuTjhUpxe7idlKJSf2vQFLljp3+8eeGeeHuY68G8XHSKKUCtOwncUtWOtIH50E ErZj3/yc3lCKW1OKNwOFW8JLis4Kdxx6T1aFmnBDuxn6svNhs7bXFdRN9lGFq5+He0B2ldSovotHK chqDUzQg==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g79Kb-00028Y-HK; Tue, 02 Oct 2018 01:18:34 +0000 Subject: Re: [PATCH security-next v4 21/32] LSM: Finalize centralized LSM enabling logic To: Kees Cook , James Morris Cc: Casey Schaufler , John Johansen , Tetsuo Handa , Paul Moore , Stephen Smalley , "Schaufler, Casey" , LSM , Jonathan Corbet , linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181002005505.6112-1-keescook@chromium.org> <20181002005505.6112-22-keescook@chromium.org> From: Randy Dunlap Message-ID: Date: Mon, 1 Oct 2018 18:18:31 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181002005505.6112-22-keescook@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/1/18 5:54 PM, Kees Cook wrote: > Prior to this patch, default "enable" behavior was unchanged: SELinux > and AppArmor were controlled separately from the centralized control > defined by CONFIG_LSM_ENABLE and "lsm.enable=...". This changes the > logic to give all control over to the central logic. > > Instead of allowing SELinux and AppArmor to override the central LSM > enabling logic, by having separate CONFIG and boot parameters, this > forces all "enable" variables to disabled, then enables any listed in > the CONFIG_LSM_ENABLE and "lsm.enable=..." settings, and finally disables > any listed in "lsm.disable=...". > > Signed-off-by: Kees Cook > --- > .../admin-guide/kernel-parameters.txt | 6 ++-- > include/linux/lsm_hooks.h | 2 +- > security/security.c | 32 +++++++------------ > 3 files changed, 15 insertions(+), 25 deletions(-) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index 67c90985d2b8..f646cfab5613 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -2279,14 +2279,12 @@ > lsm.disable=lsm1,...,lsmN > [SECURITY] Comma-separated list of LSMs to disable > at boot time. This overrides "lsm.enable=", better: This overrides "lsm.enable=" and > - CONFIG_LSM_ENABLE, and any per-LSM CONFIGs and boot > - parameters. > + CONFIG_LSM_ENABLE. > > lsm.enable=lsm1,...,lsmN > [SECURITY] Comma-separated list of LSMs to enable > at boot time. This overrides any omissions from > - CONFIG_LSM_ENABLE, and any per-LSM CONFIGs and > - boot parameters. > + CONFIG_LSM_ENABLE. > > machvec= [IA-64] Force the use of a particular machine-vector > (machvec) in a generic kernel. -- ~Randy