]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
perf: Fix documentation for sysctls perf_event_paranoid and perf_event_mlock_kb
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Sun, 20 Aug 2017 11:39:20 +0000 (14:39 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 22 Aug 2017 16:24:54 +0000 (13:24 -0300)
Fix misprint CAP_IOC_LOCK -> CAP_IPC_LOCK. This capability have nothing
to do with raw tracepoints. This part is about bypassing mlock limits.

Sysctl kernel.perf_event_paranoid = -1 allows raw and ftrace function
tracepoints without CAP_SYS_ADMIN.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/150322916080.129746.11285255474738558340.stgit@buzz
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Documentation/sysctl/kernel.txt
tools/perf/util/evsel.c

index bac23c198360507dbc00db7ef106498666826495..ce61d1fe08cacb5af99260241b058d139838029a 100644 (file)
@@ -61,6 +61,7 @@ show up in /proc/sys/kernel:
 - perf_cpu_time_max_percent
 - perf_event_paranoid
 - perf_event_max_stack
+- perf_event_mlock_kb
 - perf_event_max_contexts_per_stack
 - pid_max
 - powersave-nap               [ PPC only ]
@@ -654,7 +655,9 @@ Controls use of the performance events system by unprivileged
 users (without CAP_SYS_ADMIN).  The default value is 2.
 
  -1: Allow use of (almost) all events by all users
->=0: Disallow raw tracepoint access by users without CAP_IOC_LOCK
+     Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK
+>=0: Disallow ftrace function tracepoint by users without CAP_SYS_ADMIN
+     Disallow raw tracepoint access by users without CAP_SYS_ADMIN
 >=1: Disallow CPU event access by users without CAP_SYS_ADMIN
 >=2: Disallow kernel profiling by users without CAP_SYS_ADMIN
 
@@ -673,6 +676,14 @@ The default value is 127.
 
 ==============================================================
 
+perf_event_mlock_kb:
+
+Control size of per-cpu ring buffer not counted agains mlock limit.
+
+The default value is 512 + 1 page
+
+==============================================================
+
 perf_event_max_contexts_per_stack:
 
 Controls maximum number of stack frame context entries for
index 5dfb8bc4db8941e8f24b1d19d5f5fd3dc544c8e0..a5888c704e017a76b076cdb23e85957741fd0335 100644 (file)
@@ -2674,7 +2674,9 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
                 "unprivileged users (without CAP_SYS_ADMIN).\n\n"
                 "The current value is %d:\n\n"
                 "  -1: Allow use of (almost) all events by all users\n"
-                ">= 0: Disallow raw tracepoint access by users without CAP_IOC_LOCK\n"
+                "      Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK\n"
+                ">= 0: Disallow ftrace function tracepoint by users without CAP_SYS_ADMIN\n"
+                "      Disallow raw tracepoint access by users without CAP_SYS_ADMIN\n"
                 ">= 1: Disallow CPU event access by users without CAP_SYS_ADMIN\n"
                 ">= 2: Disallow kernel profiling by users without CAP_SYS_ADMIN\n\n"
                 "To make this setting permanent, edit /etc/sysctl.conf too, e.g.:\n\n"