Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf: Fix documentation for sysctls perf_event_paranoid and perf_event_mlock_kb

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>

authored by

Konstantin Khlebnikov and committed by
Arnaldo Carvalho de Melo
ac0bb6b7 2826478a

+15 -2
+12 -1
Documentation/sysctl/kernel.txt
··· 61 61 - perf_cpu_time_max_percent 62 62 - perf_event_paranoid 63 63 - perf_event_max_stack 64 + - perf_event_mlock_kb 64 65 - perf_event_max_contexts_per_stack 65 66 - pid_max 66 67 - powersave-nap [ PPC only ] ··· 655 654 users (without CAP_SYS_ADMIN). The default value is 2. 656 655 657 656 -1: Allow use of (almost) all events by all users 658 - >=0: Disallow raw tracepoint access by users without CAP_IOC_LOCK 657 + Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK 658 + >=0: Disallow ftrace function tracepoint by users without CAP_SYS_ADMIN 659 + Disallow raw tracepoint access by users without CAP_SYS_ADMIN 659 660 >=1: Disallow CPU event access by users without CAP_SYS_ADMIN 660 661 >=2: Disallow kernel profiling by users without CAP_SYS_ADMIN 661 662 ··· 673 670 enabled, otherwise writing to this file will return -EBUSY. 674 671 675 672 The default value is 127. 673 + 674 + ============================================================== 675 + 676 + perf_event_mlock_kb: 677 + 678 + Control size of per-cpu ring buffer not counted agains mlock limit. 679 + 680 + The default value is 512 + 1 page 676 681 677 682 ============================================================== 678 683
+3 -1
tools/perf/util/evsel.c
··· 2674 2674 "unprivileged users (without CAP_SYS_ADMIN).\n\n" 2675 2675 "The current value is %d:\n\n" 2676 2676 " -1: Allow use of (almost) all events by all users\n" 2677 - ">= 0: Disallow raw tracepoint access by users without CAP_IOC_LOCK\n" 2677 + " Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK\n" 2678 + ">= 0: Disallow ftrace function tracepoint by users without CAP_SYS_ADMIN\n" 2679 + " Disallow raw tracepoint access by users without CAP_SYS_ADMIN\n" 2678 2680 ">= 1: Disallow CPU event access by users without CAP_SYS_ADMIN\n" 2679 2681 ">= 2: Disallow kernel profiling by users without CAP_SYS_ADMIN\n\n" 2680 2682 "To make this setting permanent, edit /etc/sysctl.conf too, e.g.:\n\n"