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

Michael Ellerman mpe at ellerman.id.au
Fri Nov 17 09:36:11 AEDT 2023


Kajol Jain <kjain at 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 at linux.vnet.ibm.com>
> Signed-off-by: Kajol Jain <kjain at 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


More information about the Linuxppc-dev mailing list