aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/utsname_sysctl.c
diff options
context:
space:
mode:
authorCyril Bur <cyrilbur@gmail.com>2016-03-01 15:26:36 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-05 23:49:49 +1000
commitd4ecdff2ecdb5c01c46f2a6b1bf3f161279b330e (patch)
treeb905b4e18e9e7241e0a7114bb162bccf58c571c1 /kernel/utsname_sysctl.c
parentpowerpc/perf: Export Power9 generic and cache events to sysfs (diff)
downloadlinux-dev-d4ecdff2ecdb5c01c46f2a6b1bf3f161279b330e.tar.xz
linux-dev-d4ecdff2ecdb5c01c46f2a6b1bf3f161279b330e.zip
selftests/powerpc/pmu: Use signed long to read perf_event_paranoid
Excerpt from man 2 perf_event_open: /proc/sys/kernel/perf_event_paranoid The perf_event_paranoid file can be set to restrict access to the performance counters. 2 allow only user-space measurements. 1 allow both kernel and user measurements (default). 0 allow access to CPU-specific data but not raw tracepoint samples. -1 no restrictions. require_paranoia_below() should return 0 if perf_event_paranoid is below a specified level, the value from perf_event_paranoid is read into an unsigned long so the incorrect value is returned when perf_event_paranoid is set to -1. Without this patch applied there is the same number of selftests/powerpc which skip when /proc/sys/kernel/perf_event_paranoid is set to 1 or -1 but no skips when set to zero. With this patch applied there are no skipped selftests/powerpc test when /proc/sys/kernel/perf_event_paranoid is set to 0 or -1. Signed-off-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'kernel/utsname_sysctl.c')
0 files changed, 0 insertions, 0 deletions