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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable 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 4D0FCC433DF for ; Thu, 14 May 2020 02:44:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D2CD20659 for ; Thu, 14 May 2020 02:44:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726087AbgENCoA (ORCPT ); Wed, 13 May 2020 22:44:00 -0400 Received: from namei.org ([65.99.196.166]:58798 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbgENCoA (ORCPT ); Wed, 13 May 2020 22:44:00 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id 04E2hjXO030913; Thu, 14 May 2020 02:43:45 GMT Date: Thu, 14 May 2020 12:43:45 +1000 (AEST) From: James Morris To: Jeremy Cline cc: "Serge E . Hallyn" , Matthew Garrett , David Howells , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, "Frank Ch . Eigler" Subject: Re: [PATCH] lockdown: Allow unprivileged users to see lockdown status In-Reply-To: <20200511134230.GA2311339@dev.jcline.org> Message-ID: References: <20200220151738.1492852-1-jcline@redhat.com> <20200511134230.GA2311339@dev.jcline.org> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Mon, 11 May 2020, Jeremy Cline wrote: > On Sat, Feb 22, 2020 at 03:51:24AM +1100, James Morris wrote: > > On Thu, 20 Feb 2020, Jeremy Cline wrote: > > > > > A number of userspace tools, such as systemtap, need a way to see the > > > current lockdown state so they can gracefully deal with the kernel being > > > locked down. The state is already exposed in > > > /sys/kernel/security/lockdown, but is only readable by root. Adjust the > > > permissions so unprivileged users can read the state. > > > > > > Fixes: 000d388ed3bb ("security: Add a static lockdown policy LSM") > > > Cc: Frank Ch. Eigler > > > Signed-off-by: Jeremy Cline > > > > Looks fine to me, any objection from Matthew or others? > > > > Can we take resounding silence as no objections? Please resend and I'll apply it to my tree. > > - Jeremy > > > > --- > > > security/lockdown/lockdown.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c > > > index 5a952617a0eb..87cbdc64d272 100644 > > > --- a/security/lockdown/lockdown.c > > > +++ b/security/lockdown/lockdown.c > > > @@ -150,7 +150,7 @@ static int __init lockdown_secfs_init(void) > > > { > > > struct dentry *dentry; > > > > > > - dentry = securityfs_create_file("lockdown", 0600, NULL, NULL, > > > + dentry = securityfs_create_file("lockdown", 0644, NULL, NULL, > > > &lockdown_ops); > > > return PTR_ERR_OR_ZERO(dentry); > > > } > > > > > > > -- > > James Morris > > > > > -- James Morris