Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2098572ybv; Fri, 21 Feb 2020 08:52:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxMFJ6YL7TQ5z5StLxb2stJrC9HGGaIDHSMSdC7zRdSeu8/iIcqtREya46CPz1NbiYwKUWO X-Received: by 2002:a9d:6a4f:: with SMTP id h15mr28966956otn.86.1582303927895; Fri, 21 Feb 2020 08:52:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582303927; cv=none; d=google.com; s=arc-20160816; b=PSeD+HbdFnSnxraWFB0zJJ4xJgjXxWKardA2ntdDQ0LF+lGy5EzuP26ahZ4pPI6oMh ue5SM/2dD9p2IRtN6GBVsrZAZYogjYv2GsWUleyMXlpmhHNpeRXOG/NuPIJT7265TZJI NATpyvasiWLzRFGf7+uxhU1DFRI6PTc/IxrYESLYSkGblzl9+VwFFUKeo/VQKgDHduvb YN1w9r0BQ8JIBAhChkfauBMw7nWCkW0vlsHm4rTHOlhs3Uxp83N+RPETICMYYUSfIB1t R26YLEa5qdgGq2Tyrd0J4KPjeqRqDG5SHNEdE8vfZSoiQr2k7mEc1g8SJuiG0QW6mfVB R07Q== 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=1usZS8eQQyshvmPpo9LL4pFgVgRFVaE8KeOVgRZTacc=; b=PtmhLSSxpXG1xk7xNv0VjOFiYnRINIZyuv3pQoiVFAzHfcbd21uoV3Us0z+MohGnAm wx0oWBbL2Ke6LIAzQ+wa1bgCUzPV8MEsTaosTmOO3FGJVS1puC6aki5XfhkR3fF9ogyJ CsmBz/WgXGM4u/AbD1aqiVVRgBYRk4vuGnz6/ZIQzBLvBUW16vF39mbe1Rrf6cSQG+LM F9MaKuZpDsi9L9boZPTV5ts+WXe0+GQ5tSekcJ5G0kjaiWfPWm1HzEXsuagjZTLKzazw eZ08uA2dD19jbIFKd+kK+BpsBr6ImwFDaXu4DJeYMET5iJ5S4P1Lodt/ti4RganlIn9z GkOQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x19si1745552otk.89.2020.02.21.08.51.55; Fri, 21 Feb 2020 08:52:07 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728071AbgBUQvo (ORCPT + 99 others); Fri, 21 Feb 2020 11:51:44 -0500 Received: from namei.org ([65.99.196.166]:47390 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726550AbgBUQvn (ORCPT ); Fri, 21 Feb 2020 11:51:43 -0500 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id 01LGpOnL014504; Fri, 21 Feb 2020 16:51:24 GMT Date: Sat, 22 Feb 2020 03:51:24 +1100 (AEDT) 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: <20200220151738.1492852-1-jcline@redhat.com> Message-ID: References: <20200220151738.1492852-1-jcline@redhat.com> 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 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? > --- > 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