Re: [PATCH] powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute

2020-08-19 Thread Vaibhav Jain
Thanks Aneesh and Mpe for reviewing this patch. Michael Ellerman writes: > "Aneesh Kumar K.V" writes: [snip] >>> >>> + /* Allow access only to perfmon capable users */ >>> + if (!perfmon_capable()) >>> + return -EACCES; >>> + >> >> An access check is usually done in open(). Thi

Re: [PATCH] powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute

2020-08-13 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > On 8/13/20 10:04 AM, Vaibhav Jain wrote: >> The newly introduced 'perf_stats' attribute uses the default access >> mode of 0444 letting non-root users access performance stats of an >> nvdimm and potentially force the kernel into issuing large number of >> expensive HC

Re: [PATCH] powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute

2020-08-13 Thread Aneesh Kumar K.V
On 8/13/20 10:04 AM, Vaibhav Jain wrote: The newly introduced 'perf_stats' attribute uses the default access mode of 0444 letting non-root users access performance stats of an nvdimm and potentially force the kernel into issuing large number of expensive HCALLs. Since the information exposed by t

[PATCH] powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute

2020-08-12 Thread Vaibhav Jain
The newly introduced 'perf_stats' attribute uses the default access mode of 0444 letting non-root users access performance stats of an nvdimm and potentially force the kernel into issuing large number of expensive HCALLs. Since the information exposed by this attribute cannot be cached hence its be