Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1155278imm; Fri, 28 Sep 2018 13:01:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV63T7X2Rvf2imzoenSfDvq28c1W/nm7EiGdzme4NlG/mb3emhwO7Uk1GiQi3uq/hvcKFjPM0 X-Received: by 2002:a17:902:d715:: with SMTP id w21-v6mr138587ply.143.1538164919134; Fri, 28 Sep 2018 13:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538164919; cv=none; d=google.com; s=arc-20160816; b=QsnMgxUdIFPcPUUHX3pTL7GAIFzXaW9csgBrHyHNPhSOWR20Y0uM5/E93mz3Hr8APq Sr7zTXZZFSlLbl+LirM9DeSfn4Fe0f4fTYlFGxhnNxY6Lk5YOKlWrVgroa/NmEPsViKm 1Ml3eZqU0iMnb3gRkwA+TOB1Hgo4NmXA9JzcV3qEa5sZkkQbtIYVeHPUe1Ql+WXFbG5v +9yvtyyiAy0j6it7XRdRCZLJUWcDqRXjiUO0eVdM4RVuFtZKY3j2Dc1MA7HLGAsG16nX PX0rUE7oeeYPK95ujpAPRlbKfY6NvI7/ZQo88Pc+KUAHt5mjjNye0qcJvYUunUyak1eu E3Ag== 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=Ppb5IRdyzvtQQyB2FU+l6L5Ti22we2J9D6v64Iqw9UI=; b=JDWEkD0/yaz6ZeQ374SxsUtQH/MXUoufRNNI/9sPAgVKz8KSFt1zi+/b+UgXQOnuMB ll18N6GzSN6rtLzhvAwcjPq5IAxvdWUntSqz8DMC1H2nro4AbDV0UPi7RJLnq5GDTEZ0 EqnyE7t4i6ZSS/CuXW+jiVu/hqGeJ7ygCuc7TYfDaEBQtYa3I1WG0sCBvf64dHxhV5kt wif1LDdpNt/hXZKZ2CPGWZuWDyn+AI4c+FcPGt9wbEav7GQ9R178wNtAkOYHfQDA7BZZ SXAh9tZrOEd1ZZjB3bbBdH2vgsECf93SmMm+BrvPbeTjY/xeAJ01ZSg4dd/zN2iPJhqv hVMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DZKUYu7s; 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 w7-v6si5389606pgf.231.2018.09.28.13.01.41; Fri, 28 Sep 2018 13:01:59 -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=DZKUYu7s; 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 S1726783AbeI2C0x (ORCPT + 99 others); Fri, 28 Sep 2018 22:26:53 -0400 Received: from mail-yw1-f66.google.com ([209.85.161.66]:33093 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726451AbeI2C0x (ORCPT ); Fri, 28 Sep 2018 22:26:53 -0400 Received: by mail-yw1-f66.google.com with SMTP id r187-v6so2349010ywg.0 for ; Fri, 28 Sep 2018 13:01: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=Ppb5IRdyzvtQQyB2FU+l6L5Ti22we2J9D6v64Iqw9UI=; b=DZKUYu7sM4zdQyT3GgAUGCAw8Y/7k/PhNqMQRqFBQMneh5C2Yly9R9ncqGnezDL4CO capMDA5FUjYp/bk9Qi7xbeysh8Snbl7JxB67PE9zUx2CRoFwga0rkIJ6ltLVlqdAzmU3 pXh8QYyQ0royQIZ7Hp/1zzkmlQzhqOuAzrRP4= 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=Ppb5IRdyzvtQQyB2FU+l6L5Ti22we2J9D6v64Iqw9UI=; b=Rx/AT1ZRQOloH0MWEVlpjXS4v6mYESzRxiuk0yGtTPLYjmL+1YBg0EnRs2STra62yP btWzAhFmeJetTjo9F0DrM1EXxHrPpTYkU8AXtZ+RRGTfKfsmKum/l+5BPYHisStBoaNS nS1ARLRBYYUglfcjfN23ceMHizeadu3T+Ebj8g+LwXJYdzlwPPNabHXa7J8w3C/FTBlM fVLSjAc428KgxB1nCokhYpT5b/GXkDJ2MRzVr79rawWIvoZzoegDWUYPMVYmFHpiVkDO pqk1dIh6JXW7QpL+LzF/SOYJ54odUrlxxsYTbHVlFPggebtU4yOMgynI7jVKpwXGa0jE Ks5A== X-Gm-Message-State: ABuFfogpJWlyxi47C52K4pTKNUSUeLividQ1zxIWAf7AD1JTcOp0iAgI ftO/4VlLRkPlLLZ+gkRDHndGEn+4zKY= X-Received: by 2002:a81:5055:: with SMTP id e82-v6mr119954ywb.232.1538164893131; Fri, 28 Sep 2018 13:01:33 -0700 (PDT) Received: from mail-yw1-f46.google.com (mail-yw1-f46.google.com. [209.85.161.46]) by smtp.gmail.com with ESMTPSA id z125-v6sm2558888ywg.57.2018.09.28.13.01.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Sep 2018 13:01:31 -0700 (PDT) Received: by mail-yw1-f46.google.com with SMTP id h134-v6so3130985ywc.9 for ; Fri, 28 Sep 2018 13:01:31 -0700 (PDT) X-Received: by 2002:a81:98d7:: with SMTP id p206-v6mr84151ywg.353.1538164890789; Fri, 28 Sep 2018 13:01:30 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:d116:0:0:0:0:0 with HTTP; Fri, 28 Sep 2018 13:01:30 -0700 (PDT) In-Reply-To: References: <20180925001832.18322-1-keescook@chromium.org> From: Kees Cook Date: Fri, 28 Sep 2018 13:01:30 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH security-next v3 00/29] LSM: Explict LSM ordering To: Casey Schaufler Cc: James Morris , John Johansen , Tetsuo Handa , Paul Moore , Stephen Smalley , "Schaufler, Casey" , LSM , 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 Fri, Sep 28, 2018 at 8:55 AM, Casey Schaufler wrote: > On 9/24/2018 5:18 PM, Kees Cook wrote: >> v3: >> - add CONFIG_LSM_ENABLE and refactor resulting logic > > Kees, you can add my > > Reviewed-by:Casey Schaufler > > for this entire patch set. Thank you for taking this on, it's > a significant and important chunk of the LSM infrastructure > update. Thanks! John, you'd looked at this a bit too -- do the results line up with your expectations? Any thoughts from SELinux, TOMOYO, or IMA folks? -Kees > > >> ... >> Breakdown of patches: >> >> Infrastructure improvements (no logical changes): >> LSM: Correctly announce start of LSM initialization >> vmlinux.lds.h: Avoid copy/paste of security_init section >> LSM: Rename .security_initcall section to .lsm_info >> LSM: Remove initcall tracing >> LSM: Convert from initcall to struct lsm_info >> vmlinux.lds.h: Move LSM_TABLE into INIT_DATA >> LSM: Convert security_initcall() into DEFINE_LSM() >> LSM: Record LSM name in struct lsm_info >> LSM: Provide init debugging infrastructure >> LSM: Don't ignore initialization failures >> >> Split "integrity" out into "ordered initialization" (no logical changes): >> LSM: Introduce LSM_FLAG_LEGACY_MAJOR >> LSM: Provide separate ordered initialization >> >> Provide centralized LSM enable/disable infrastructure: >> LoadPin: Rename "enable" to "enforce" >> LSM: Plumb visibility into optional "enabled" state >> LSM: Lift LSM selection out of individual LSMs >> LSM: Prepare for arbitrary LSM enabling >> LSM: Introduce CONFIG_LSM_ENABLE >> LSM: Introduce lsm.enable= and lsm.disable= >> LSM: Prepare for reorganizing "security=" logic >> LSM: Refactor "security=" in terms of enable/disable >> >> Provide centralized LSM ordering infrastructure: >> LSM: Build ordered list of ordered LSMs for init >> LSM: Introduce CONFIG_LSM_ORDER >> LSM: Introduce "lsm.order=" for boottime ordering >> >> Move minor LSMs into ordered LSM initialization: >> LoadPin: Initialize as ordered LSM >> Yama: Initialize as ordered LSM >> LSM: Introduce enum lsm_order >> capability: Initialize as LSM_ORDER_FIRST >> >> Move major LSMs into ordered LSM initialization: >> LSM: Separate idea of "major" LSM from "exclusive" LSM >> LSM: Add all exclusive LSMs to ordered initialization >> >> -Kees >> >> .../admin-guide/kernel-parameters.txt | 20 + >> arch/arc/kernel/vmlinux.lds.S | 1 - >> arch/arm/kernel/vmlinux-xip.lds.S | 1 - >> arch/arm64/kernel/vmlinux.lds.S | 1 - >> arch/h8300/kernel/vmlinux.lds.S | 1 - >> arch/microblaze/kernel/vmlinux.lds.S | 2 - >> arch/powerpc/kernel/vmlinux.lds.S | 2 - >> arch/um/include/asm/common.lds.S | 2 - >> arch/xtensa/kernel/vmlinux.lds.S | 1 - >> include/asm-generic/vmlinux.lds.h | 25 +- >> include/linux/init.h | 2 - >> include/linux/lsm_hooks.h | 43 ++- >> include/linux/module.h | 1 - >> security/Kconfig | 61 ++- >> security/apparmor/lsm.c | 16 +- >> security/commoncap.c | 8 +- >> security/integrity/iint.c | 5 +- >> security/loadpin/Kconfig | 4 +- >> security/loadpin/loadpin.c | 28 +- >> security/security.c | 351 +++++++++++++++--- >> security/selinux/hooks.c | 16 +- >> security/smack/smack_lsm.c | 8 +- >> security/tomoyo/tomoyo.c | 7 +- >> security/yama/yama_lsm.c | 7 +- >> 24 files changed, 438 insertions(+), 175 deletions(-) >> > -- Kees Cook Pixel Security