]> git.baikalelectronics.ru Git - kernel.git/commit
s390/cpum_sf.c: fix file permission for cpum_sfb_size
authorThomas Richter <tmricht@linux.ibm.com>
Wed, 11 Nov 2020 15:26:25 +0000 (16:26 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 12 Nov 2020 11:10:36 +0000 (12:10 +0100)
commite6742a3e938b079572b995c470de957fb3b0cb72
tree88631e0926c863c740169b33cec19218f056a290
parent18dd3c1139cb9869fa731c19bd26528ba773015d
s390/cpum_sf.c: fix file permission for cpum_sfb_size

This file is installed by the s390 CPU Measurement sampling
facility device driver to export supported minimum and
maximum sample buffer sizes.
This file is read by lscpumf tool to display the details
of the device driver capabilities. The lscpumf tool might
be invoked by a non-root user. In this case it does not
print anything because the file contents can not be read.

Fix this by allowing read access for all users. Reading
the file contents is ok, changing the file contents is
left to the root user only.

For further reference and details see:
 [1] https://github.com/ibm-s390-tools/s390-tools/issues/97

Fixes: dfcde413c4c2 ("s390/cpum_sf: Dynamically extend the sampling buffer if overflows occur")
Cc: <stable@vger.kernel.org> # 3.14
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/perf_cpum_sf.c