diff mbox series

[2/2] powerpc/hv-gpxi: Fix access permission of hv-gpci interface files

Message ID 20231116122033.160964-2-kjain@linux.ibm.com (mailing list archive)
State Changes Requested
Headers show
Series [1/2] powerpc/hv-gpci: Add return value check in affinity_domain_via_partition_show function | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 6 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 23 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.

Commit Message

Kajol Jain Nov. 16, 2023, 12:20 p.m. UTC
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(-)

Comments

Michael Ellerman Nov. 16, 2023, 10:36 p.m. UTC | #1
Kajol Jain <kjain@linux.ibm.com> writes:
> Fix access permission of the hv-gpci topology information
> interface files from 0444 to 0400 (admin read only).

Please explain why they should be 0400.

Also typo in subject, "hv-gpxi".

cheers

> 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
Kajol Jain Nov. 17, 2023, 5:43 a.m. UTC | #2
On 11/17/23 04:06, Michael Ellerman wrote:
> Kajol Jain <kjain@linux.ibm.com> writes:
>> Fix access permission of the hv-gpci topology information
>> interface files from 0444 to 0400 (admin read only).
> 
> Please explain why they should be 0400.
> 
> Also typo in subject, "hv-gpxi".

Hi Michael,
  Thanks for reviewing it. Will add the details in next version of the
patch.

Thanks,
Kajol Jain

> 
> cheers
> 
>> 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
diff mbox series

Patch

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: