Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp992149ybk; Wed, 13 May 2020 19:46:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7sk+A9JMM1HiPMLUFHe3fSTvT0hoyWKKaaARFGhaB/FPEYYz0G02ZPiz2V2E0MKQ2oYJO X-Received: by 2002:aa7:c98a:: with SMTP id c10mr2226930edt.94.1589424377675; Wed, 13 May 2020 19:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589424377; cv=none; d=google.com; s=arc-20160816; b=kLxlEBFpkDIxeVqJHt+PRtePeATkLe6ytxinwj6HJ6RKc/4eYy+1BKHqPlQJO8BW0z t9dELY5/qv10bCb2ZVDdkqJussE3TsFlSWwOZe+HIw+5TWnX5sy40uB5i9OFuKOeS+eg QmtdZ1UAdOSJvIcS2kQKCz8DH9nwidr4f/lDw3rbPGyiTYZjEYU6JrX+ek9FmSUf6oEJ yzw/EWX1hYCXVk1CM5szULAOp040jNE5YFEXxvbCKJy9p8eFRv/YHC9Sv2RRApBayvDt MNVse8QtFnVAOju64dvPseY+FPCaUTn+SUBemGjfq/CIegHJThwdiPhyuevEyrhcPJ9/ HTCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=z4XirA2SGqLNi79o3OW6aUZFPbjOFE55HL5crAK7wKs=; b=d+r9cfPZHbHWBW4Qb7mLM7vDAGX57nTFgi9/JjEQkliWgj+T/QzZmSFQtNthDaMGDJ Ug/WRyBIoWF69ABjJY3UocSX0r4vFXyf6e5qrA9UIGx0R52aGoEcKTjLMeCzw8dgNmpS ZtDXkzxVW3D4EdT2RMDv6TtlFlsQ/yoOMSeqER/s80RvZYzWPbpj2g1BMWQsH4sh2Kon 5BSp3wWpHjo6oKKiqnBgnq7bVgOHQjPSprJj+B9H8zpx8fPG+KkXPMJCCv1HsYIEGlqF isCfgAYQWHhQ8DyD6HkzNiKiwOdq8RBMocvXrsN7H12plQ3wrwg7gu2JVRBaX+aTl3wk Vm2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r28si903318edl.121.2020.05.13.19.45.55; Wed, 13 May 2020 19:46:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726094AbgENCoA (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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