Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1884461ybk; Mon, 11 May 2020 06:45:12 -0700 (PDT) X-Google-Smtp-Source: APiQypI867f7tIHejgj458HEtwifGkhNaI8bSCct9sSdVN+3MIOShdiJ237nkZkrX0r8n4oIuMeH X-Received: by 2002:a50:d65c:: with SMTP id c28mr5079406edj.21.1589204712672; Mon, 11 May 2020 06:45:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589204712; cv=none; d=google.com; s=arc-20160816; b=Dbt/4I/VMTjBaLQ2J7RTFKq9uq6SZlwkoYQaDREVRQnGYEfQ9SvYNFN2ohMSEZAX0F 0bAPxgiWC+ySDX+fp7D4dsJ2l4Mf61rpglKmERzWOSZEVtPcM37EIBv3ABNyGP9K6wM4 Aldc/hhw6YN7W3ljp3vvaG2dwPG33fHfNx16m21TlubUHGgejaPffG7RrjRWanZ9+Vca iZstSxobgpsWeCBp9HV+SxNC8aR70FSoDd0YRxRNsM1mqxrNagzrUkvMEbatxTU3WTE1 hCb3MIYKQPMhuigqE1Am5w1M4IdTmfv7qxc+3yMBuOJhrZMjyYTbEQjzvy1s1vyMi5x3 MS2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=a+4ueUpxmGyJDhdbyflC74SPtwDyNM5MVN9jc/tyoSI=; b=i/NDjOs0UffD/K2CCWk/rHroivKBB/N9c6gFpY9/tyb+NA9ETdSJW/Imes+dRw73fB bcZg9txJFzngT3brAv11U06nievT/Whyik8RdyA2smQU72uAPtwfrqiErdwg2jTwI7s3 aVZnrybBcaOHlWjPj0ByNoZQq/CQscKQ/QESuP0eyAeoxM2u7zNA1wq2ClYEaZlOIn+m 20Ue2mjeL7o3qUtJDnHyw32XfWViuFyr1QcE5mdMzvbzaEmClu6vfnMpMEzrw/mu21CI o5DAY43K7kyeVGE8YAB2CDBHUntVCWSl+luRUEM0k2ON+jgIrxao3KKdpv/VTwckVdoR SQWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AxEioQ6g; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m30si1996305ede.253.2020.05.11.06.44.48; Mon, 11 May 2020 06:45:12 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AxEioQ6g; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730109AbgEKNmh (ORCPT + 99 others); Mon, 11 May 2020 09:42:37 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:44872 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729540AbgEKNmg (ORCPT ); Mon, 11 May 2020 09:42:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589204555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=a+4ueUpxmGyJDhdbyflC74SPtwDyNM5MVN9jc/tyoSI=; b=AxEioQ6gtfDKApfSJ0M5QyFLyW5aMGaBQnZK+XgD6zRzuNiAr/9q1S9wlKN6GKg9scukNE mRBpTSasC+DBhOTbuICh/t+BK5uynAKBpsho8neKjDvQ48PQOWDBeBj2T7RvwU42NvJ86e zPljbWTNqVGUJhESS1vLlMxhi3T9PR0= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-135-gZ3L24Z9OhOP5BMS4fPieQ-1; Mon, 11 May 2020 09:42:33 -0400 X-MC-Unique: gZ3L24Z9OhOP5BMS4fPieQ-1 Received: by mail-qk1-f197.google.com with SMTP id f200so3461652qke.14 for ; Mon, 11 May 2020 06:42:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=a+4ueUpxmGyJDhdbyflC74SPtwDyNM5MVN9jc/tyoSI=; b=O/d1ROn/Zc6n7SatmYRvERIDqCgsQUBhsVavNdX5+dBkAjnM1YypV4Jzicj2E9yiHN C5YW3jEii9zHBNzU5LnyXnI+XM+o7HynC/nSSp6SYb/Whn8xgv/rLsZUBNnO65+OS4no nYy1UUURsq0dv01teqadS3PQtCfxYgnEniQX9a8jVGMofRBm28Qwyemy5VBlgEVoCbMN m9P7U0Cb+4cQ5jjM/y6uN43o+Wh6VSO+vJj4rItXZFaKdmU3EGSWa09U+6QAVafIbeWV WF2d3H2fI2KgqOj2eGzeOPK/BIcNwRpSUFqF9XNhnbxpJ4klqLy4+4h6vGiKUZzcne5K vNxw== X-Gm-Message-State: AGi0PuYIkqnYx2vKReLmiE8V08sbiki4AfKwdz54jC4zQ7WZJV++ElZM XV+3D2eY4AsJ8R3QsKWJr3MbEhvHWx4Q1OQO+RJmVffrNsh6Q7qULxXr0AmXZI26b5j3xesulBm 2/eAhLlm/u407FQriljG5W4zf X-Received: by 2002:ac8:73c1:: with SMTP id v1mr2550411qtp.320.1589204552985; Mon, 11 May 2020 06:42:32 -0700 (PDT) X-Received: by 2002:ac8:73c1:: with SMTP id v1mr2550390qtp.320.1589204552670; Mon, 11 May 2020 06:42:32 -0700 (PDT) Received: from dev.jcline.org ([136.56.87.133]) by smtp.gmail.com with ESMTPSA id c63sm7973124qkf.131.2020.05.11.06.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 06:42:31 -0700 (PDT) Date: Mon, 11 May 2020 09:42:30 -0400 From: Jeremy Cline To: James Morris 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 Message-ID: <20200511134230.GA2311339@dev.jcline.org> References: <20200220151738.1492852-1-jcline@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? - 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 > >