From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F127C10F00 for ; Sat, 7 Mar 2020 01:49:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47D43206D7 for ; Sat, 7 Mar 2020 01:49:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore-com.20150623.gappssmtp.com header.i=@paul-moore-com.20150623.gappssmtp.com header.b="0m3qxHrW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726271AbgCGBt0 (ORCPT ); Fri, 6 Mar 2020 20:49:26 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:40812 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726237AbgCGBt0 (ORCPT ); Fri, 6 Mar 2020 20:49:26 -0500 Received: by mail-ed1-f67.google.com with SMTP id a13so4694020edu.7 for ; Fri, 06 Mar 2020 17:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/FOniSNLG9NOoiIgdzqrLoGCWO53yN4XOJhLMOwscH4=; b=0m3qxHrWHE/4YxYXAHpENQ9CBueHBdg2q92XobXj3OOEVE+twDeNI41qXBZCcURu50 yg+729gbP4WuGl6x7aUZFe73H+ObwPc18O7EZ904GTmcux9eV04aXVJqcWS56IIEGtd2 ek+lwtgJEH8VxU91eu0O2tjJNvRLIWH8QDA3ZKmJINtunig/3BOlRsCikHgKKBxKj/K3 bwGLpaCmryZERuZdrvDLrpgo7geh5FD5fhH2ojK3y3fGatTORrtcWcmcWOTU7AYZs5lY vByF/olAWwct1iqRzzVanznQG3K6BEi6dqGvOR7VnaAEcyO8xgqCxTL6dgKnkNq6eJGm HqaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/FOniSNLG9NOoiIgdzqrLoGCWO53yN4XOJhLMOwscH4=; b=F8JkijLlmGCsJhtGHmkRnQ26vPdPGHKCD4/ZPZ/i6RD/hq+0SW+PWTYNx1qilOhoRv b+13plAGbiYkOp0Yhiqx7kx+SUQJPZ1R3t8JNIvxzRUlicwniJEJfMDdjIh+IAcv3smA Naw8tr5yfH9o3mInCjMJlfS3UqGnrJvLVLWQQO0LDfjcxfdpKiJn9/eQ9xdJqtD6OW/D C4Jw4KxdyPTdR5F6NewWXSwS/9p38geCd+ys0dn0Jx0JZo85WUOAMhmCazuIoy/0Ak3T P2CSZwQPHZp7+Cz8ISWPgk6QfgFDojhydkoTMdAP3juFyqkN/qsu504zqeZbm37c3BR3 1B+Q== X-Gm-Message-State: ANhLgQ2HJJrWX2+SGFR9qXz3YsrmLT2pLkzKwp/C348yumrVjrWpFeqo WJP76yMPhyvZ+XUo0902VbhrBk29yrld+e13xrnA X-Google-Smtp-Source: ADFU+vs/v20p/MGxa6offlJP3Z5TefyfjxW8Vg+MSmjVSScR3nNYQDnHlpPIs6e1P40Ib6ka8pkYzAj1tq4l90bRqdc= X-Received: by 2002:a17:906:3607:: with SMTP id q7mr5365909ejb.308.1583545763428; Fri, 06 Mar 2020 17:49:23 -0800 (PST) MIME-Version: 1.0 References: <20200214234203.7086-1-casey@schaufler-ca.com> <20200214234203.7086-14-casey@schaufler-ca.com> In-Reply-To: <20200214234203.7086-14-casey@schaufler-ca.com> From: Paul Moore Date: Fri, 6 Mar 2020 20:49:12 -0500 Message-ID: Subject: Re: [PATCH v15 13/23] LSM: Specify which LSM to display To: Casey Schaufler Cc: casey.schaufler@intel.com, James Morris , linux-security-module@vger.kernel.org, selinux@vger.kernel.org, keescook@chromium.org, john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp, Stephen Smalley Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Fri, Feb 14, 2020 at 6:44 PM Casey Schaufler wrote: > > Create a new entry "display" in the procfs attr directory for > controlling which LSM security information is displayed for a > process. A process can only read or write its own display value. > > The name of an active LSM that supplies hooks for > human readable data may be written to "display" to set the > value. The name of the LSM currently in use can be read from > "display". At this point there can only be one LSM capable > of display active. A helper function lsm_task_display() is > provided to get the display slot for a task_struct. > > Setting the "display" requires that all security modules using > setprocattr hooks allow the action. Each security module is > responsible for defining its policy. > > AppArmor hook provided by John Johansen > SELinux hook provided by Stephen Smalley > > Acked-by: Stephen Smalley > Signed-off-by: Casey Schaufler > --- > fs/proc/base.c | 1 + > include/linux/lsm_hooks.h | 15 +++ > security/apparmor/include/apparmor.h | 3 +- > security/apparmor/lsm.c | 32 +++++ > security/security.c | 167 ++++++++++++++++++++++++--- > security/selinux/hooks.c | 11 ++ > security/selinux/include/classmap.h | 2 +- > security/smack/smack_lsm.c | 7 ++ > 8 files changed, 219 insertions(+), 19 deletions(-) For the core and SELinux portions. Acked-by: Paul Moore -- paul moore www.paul-moore.com