Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp16637imm; Thu, 13 Sep 2018 14:53:15 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZH7B5uvSVtCJLnlP3TlOdzmIywgLKq/1/6EKh/vWyKE0fbm+LE+j6nPPHcx4jjMbjtiiEo X-Received: by 2002:a17:902:8345:: with SMTP id z5-v6mr8900433pln.147.1536875595696; Thu, 13 Sep 2018 14:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536875595; cv=none; d=google.com; s=arc-20160816; b=S43uMCXc/BBkzKbmtQhqO4MZb7IKj+yIvoAWT6tUj2+/Q1uRri5keO8gfDE/syXo4B QIJJYQ9/d0eHOJCG2EGYsPmnoRd/mdPRMtSIydvHxdurKtv6ehfYqzZZwcf6muN/wAXE ZdVJDTmZiZWPZ1behcgFqX5bVioEUWhXkMgxBd5J+le4rfaFYtT4ClTRALxdVHCh6CCi G/ZflIXUrV0V+0NVucXxH/q1OInZQfeGwOY5U69AV454AKtwLPX6NEctyk0jM//kHgit nrM+h9qkrI5SFi0a8cXrx7dK3ooAlrBq63E4OSw6PL1F42iF+ei0IbKnNYdsp0DlaAIl RiLQ== 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=vcYGkvhLJaDy0HR8Vri0K78eWfACUqgqrMj8r432pa0=; b=mKJgq4mKO1tFKtoFjh/8/PO2gAS5//jIMCgnZcEBEcUqn5eRGPlzsD6p+9NbWapgwR jehJ4QO22wEk8u7lXpInWz4nIrijT/OpXXwKbYTuUlhx8FkhX1eo6ssj17QzyDnJ+WuP VdP5SkKCkiml2rlf6s2YfH9/gxfVTt0V50qOtKxYNWRpVm0+VleCoYJbJ9pxJFjRxYPo 6CT3rdueX3JlSVR2EZ+fOdFpFbTr7/VD0fh+pmG/si40pO+ylj+pvUOQfm/Z81Gsl53p t29CbqIATlFuyCzVHN/w+aHF+s/qKdOS/O1spqlBIpOHJccMjuQPYTd7v/oZBvbxlHy/ YYhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Gst+g95s; 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 r73-v6si5281540pfk.83.2018.09.13.14.53.01; Thu, 13 Sep 2018 14:53:15 -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=Gst+g95s; 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 S1728395AbeINDDW (ORCPT + 99 others); Thu, 13 Sep 2018 23:03:22 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:46516 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727844AbeINDDW (ORCPT ); Thu, 13 Sep 2018 23:03:22 -0400 Received: by mail-yb1-f194.google.com with SMTP id y20-v6so3922232ybi.13 for ; Thu, 13 Sep 2018 14:52:00 -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=vcYGkvhLJaDy0HR8Vri0K78eWfACUqgqrMj8r432pa0=; b=Gst+g95s0g5VTODe2asIe2jbgtwAwUk6gggYBK+DUYqjnod4oxLoRh/bBPx+rs4DI3 KcYhsDbMS672h1zaGenR0bjGQvEA+U0sTpoGpqa9XRfNLJisDIqFUyTDusRIdnY5dcI3 G0qHG8aSv3eoAPKWKG9uM/iwOhFJbbbpPQhfM= 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=vcYGkvhLJaDy0HR8Vri0K78eWfACUqgqrMj8r432pa0=; b=p9tFS8CMwzqEXy/U8v8+ix4Ki9quqjZ7jLim9sC3zg5nFPfyLLleEFYHvBjp6Wrr8m xzY1wKKivKbO1qTEDL1W+0IBH0sp19wLP8aX7SXvkv5ZQ5dh8IoV7/nwOR32rnuklxGz cifvz9PK4pGgkoZ4nK6qhTN32FybmiXAMJzHn2KDV6/bdTz//hMoa9KfrHzhg2m9H47O octP9SYNup5iwoTTdyWH4KYuCwX6UgHNKMu7mZlwsc+skCbu4r178h2dqnKMkGTxXBCt OnVGkK4k82t23prafFpm9G943scsGiT2q0o5negtHjWxMMfDbTAYwK+Jyhf5SJleYEZO e1AA== X-Gm-Message-State: APzg51CASCn/8IO0f8CXmZg5i0FAK6Bo77OTy+9BlmOodzGMUaYiwMIU KTRk6l9GQUF3xb5l66kBYxCn0JfupjM= X-Received: by 2002:a25:b904:: with SMTP id x4-v6mr4395473ybj.56.1536875520095; Thu, 13 Sep 2018 14:52:00 -0700 (PDT) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com. [209.85.219.177]) by smtp.gmail.com with ESMTPSA id s63-v6sm2568095ywd.63.2018.09.13.14.51.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Sep 2018 14:51:59 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id t10-v6so3966643ybb.1 for ; Thu, 13 Sep 2018 14:51:58 -0700 (PDT) X-Received: by 2002:a25:f606:: with SMTP id t6-v6mr4554188ybd.141.1536875518364; Thu, 13 Sep 2018 14:51:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:5f04:0:0:0:0:0 with HTTP; Thu, 13 Sep 2018 14:51:57 -0700 (PDT) In-Reply-To: References: <99cb1ae7-8881-eb9a-a8cb-a787abe454e1@schaufler-ca.com> From: Kees Cook Date: Thu, 13 Sep 2018 14:51:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 10/10] LSM: Blob sharing support for S.A.R.A and LandLock To: Paul Moore Cc: Casey Schaufler , linux-security-module , James Morris , LKML , SE Linux , John Johansen , Tetsuo Handa , Stephen Smalley , "linux-fsdevel@vger.kernel.org" , Alexey Dobriyan , "Schaufler, Casey" 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, Sep 13, 2018 at 2:38 PM, Paul Moore wrote: > The infrastructure bits aren't really my concern; in fact I *like* > that the infrastructure is always exercised, it makes > testing/debugging easier. I also like the ability to limit the > user/admin to one LSM at boot time to make support easier; my goal is > to allow a distro to build support for multiple LSMs without also > requiring that distro to support *stacked* LSMs I see your point, but as soon as SARA and Landlock appear, they'll have: depends on SECURITY_STACKING and then all distros will enable it and there will be no sensible runtime way to manage it. If, instead, we make it entirely runtime now, then a CONFIG can control the default state and we can provide guidance to how SARA and Landlock should expose their "enable"ness. At the very least, to avoid stacking now (i.e. TOMOYO being enabled with another major LSM), we just do nothing. The existing code already makes the existing major LSMs exclusive. Adding a stackable LSM would need to just have its own "enable" flag (i.e. ignore security_module_enable()), and then either check a runtime "is stacking allowed?" flag or have new "depends on SECURITY_STACKING". (I think the CONFIG will force distros into enabling it without any runtime opt-out.) > (see my earlier > comments about the difficulty in determining the source of a failed > operation). Agreed. I would hope that audit could help for that case. *stare at blue sky* -Kees -- Kees Cook Pixel Security