• Thomas Richter's avatar
    s390/cpum_cf: open access to hwctr device for CAP_PERFMON privileged process · d0d3e218
    Thomas Richter authored
    
    
    The device /dev/hwctr was introduced to access complete
    CPU Measurement facility counter sets via an ioctl system call.
    The access the to device is limited to privileged processes
    running as root or superuser. The capability CAP_SYS_ADMIN
    is required.  The device permissions are read/write for the
    device owner root. There is no need for this restriction.
    
    Make the device access permission read/write for all and
    reduce the capabilities to CAP_PERFMON.
    Any user space program with the CAP_PERFMON capability assigned to it
    can now read and display the CPU Measurement facility counter sets.
    
    For more details on perf tool usage and security, see linux
    documentation in Documentation/admin-guide/perf-security.rst.
    Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
    Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
    d0d3e218
perf_cpum_cf.c 50.8 KB