WSL2-Linux-Kernel/arch/powerpc/platforms
Vaibhav Jain 0460534b53 powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute
The newly introduced 'perf_stats' attribute uses the default access
mode of 0444, allowing non-root users to access performance stats of
an nvdimm and potentially force the kernel into issuing a large number
of expensive hypercalls. Since the information exposed by this
attribute cannot be cached it is better to ward off access to this
attribute from users who don't need to access to these performance
statistics.

Hence update the access mode of 'perf_stats' attribute to be only
readable by root users.

Fixes: 2d02bf835e ("powerpc/papr_scm: Fetch nvdimm performance stats from PHYP")
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200907110540.21349-1-vaibhav@linux.ibm.com
2020-09-09 14:44:38 +10:00
..
4xx powerpc/4xx: Don't unmap NULL mbase 2020-05-28 23:24:36 +10:00
8xx mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
40x powerpc: Remove IBM405 Erratum #77 2020-05-28 23:24:36 +10:00
44x powerpc/40x: Remove support for ISS Simulator 2020-05-28 23:24:35 +10:00
52xx powerpc updates for 5.9 2020-08-07 10:33:50 -07:00
82xx powerpc/82xx: Blacklist pq2_restart() for kprobe 2020-06-02 20:59:09 +10:00
83xx powerpc/83xx: Blacklist mpc83xx_deep_resume() for kprobe 2020-06-02 20:59:09 +10:00
85xx powerpc/Kconfig: Replace HTTP links with HTTPS ones 2020-07-16 13:12:46 +10:00
86xx mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
512x powerpc/512x: Use dma_request_chan() instead dma_request_slave_channel() 2020-01-06 16:25:29 +11:00
amigaone powerpc/32: drop unused ISA_DMA_THRESHOLD 2020-04-01 14:30:50 +11:00
cell powerpc updates for 5.9 2020-08-07 10:33:50 -07:00
chrp mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
embedded6xx powerpc/wii: Fix declaration made after definition 2020-05-20 23:39:56 +10:00
maple mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
pasemi powerpc: use for_each_child_of_node() macro 2020-07-29 22:30:33 +10:00
powermac Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
powernv Revert "powerpc/powernv/idle: Replace CPU feature check with PVR check" 2020-08-27 17:41:45 +10:00
ps3 powerpc/ps3: Fix kexec shutdown hang 2020-05-19 00:10:35 +10:00
pseries powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute 2020-09-09 14:44:38 +10:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig.cputype powerpc/32s: Disable VMAP stack which CONFIG_ADB_PMU 2020-08-28 12:03:18 +10:00
Makefile
fsl_uli1575.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00