linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kajol Jain <kjain@linux.ibm.com>
To: mpe@ellerman.id.au
Cc: atrajeev@linux.vnet.ibm.com, kjain@linux.ibm.com,
	Disha Goel <disgoel@linux.vnet.ibm.com>,
	maddy@linux.ibm.com, disgoel@linux.ibm.com,
	linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 2/2] powerpc/hv-gpxi: Fix access permission of hv-gpci interface files
Date: Thu, 16 Nov 2023 17:50:33 +0530	[thread overview]
Message-ID: <20231116122033.160964-2-kjain@linux.ibm.com> (raw)
In-Reply-To: <20231116122033.160964-1-kjain@linux.ibm.com>

Fix access permission of the hv-gpci topology information
interface files from 0444 to 0400 (admin read only).

Fixes: 71f1c39647d8 ("powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show processor bus topology information")
Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
---
 arch/powerpc/perf/hv-gpci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/perf/hv-gpci.c b/arch/powerpc/perf/hv-gpci.c
index 27f18119fda1..303d160319e8 100644
--- a/arch/powerpc/perf/hv-gpci.c
+++ b/arch/powerpc/perf/hv-gpci.c
@@ -890,7 +890,7 @@ static struct device_attribute *sysinfo_device_attr_create(int
 			return NULL;
 
 		sysfs_attr_init(&attr->attr);
-		attr->attr.mode = 0444;
+		attr->attr.mode = 0400;
 
 		switch (sysinfo_interface_group_index) {
 		case INTERFACE_PROCESSOR_BUS_TOPOLOGY_ATTR:
-- 
2.39.3


  reply	other threads:[~2023-11-16 12:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 12:20 [PATCH 1/2] powerpc/hv-gpci: Add return value check in affinity_domain_via_partition_show function Kajol Jain
2023-11-16 12:20 ` Kajol Jain [this message]
2023-11-16 22:36   ` [PATCH 2/2] powerpc/hv-gpxi: Fix access permission of hv-gpci interface files Michael Ellerman
2023-11-17  5:43     ` kajoljain
2023-12-21 10:38 ` (subset) [PATCH 1/2] powerpc/hv-gpci: Add return value check in affinity_domain_via_partition_show function Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231116122033.160964-2-kjain@linux.ibm.com \
    --to=kjain@linux.ibm.com \
    --cc=atrajeev@linux.vnet.ibm.com \
    --cc=disgoel@linux.ibm.com \
    --cc=disgoel@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).