Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1715926 > unrolled thread
| Started by | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> |
|---|---|
| First post | 2017-08-20 13:50 +0200 |
| Last post | 2017-08-24 10:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] tools/perf: fix documentation for sysctls perf_event_paranoid and perf_event_mlock_kb Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-08-20 13:50 +0200
Re: [PATCH] tools/perf: fix documentation for sysctls perf_event_paranoid and perf_event_mlock_kb Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-22 18:00 +0200
[tip:perf/core] perf: Fix documentation for sysctls perf_event_paranoid and perf_event_mlock_kb tip-bot for Konstantin Khlebnikov <tipbot@zytor.com> - 2017-08-24 10:40 +0200
| From | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> |
|---|---|
| Date | 2017-08-20 13:50 +0200 |
| Subject | [PATCH] tools/perf: fix documentation for sysctls perf_event_paranoid and perf_event_mlock_kb |
| Message-ID | <ugwTU-6pr-1@gated-at.bofh.it> |
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> --- Documentation/sysctl/kernel.txt | 13 ++++++++++++- tools/perf/util/evsel.c | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index bac23c198360..ce61d1fe08ca 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -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 diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 413f74df08de..5ed7056d1fd0 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -2535,7 +2535,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"
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-08-22 18:00 +0200 |
| Message-ID | <uhjKV-4r8-7@gated-at.bofh.it> |
| In reply to | #1715926 |
Em Sun, Aug 20, 2017 at 02:39:20PM +0300, Konstantin Khlebnikov escreveu: > 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. Thanks, looks sane, applied. - Arnaldo > Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> > --- > Documentation/sysctl/kernel.txt | 13 ++++++++++++- > tools/perf/util/evsel.c | 4 +++- > 2 files changed, 15 insertions(+), 2 deletions(-) > > diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt > index bac23c198360..ce61d1fe08ca 100644 > --- a/Documentation/sysctl/kernel.txt > +++ b/Documentation/sysctl/kernel.txt > @@ -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 > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c > index 413f74df08de..5ed7056d1fd0 100644 > --- a/tools/perf/util/evsel.c > +++ b/tools/perf/util/evsel.c > @@ -2535,7 +2535,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"
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Konstantin Khlebnikov <tipbot@zytor.com> |
|---|---|
| Date | 2017-08-24 10:40 +0200 |
| Subject | [tip:perf/core] perf: Fix documentation for sysctls perf_event_paranoid and perf_event_mlock_kb |
| Message-ID | <uhVQg-43p-53@gated-at.bofh.it> |
| In reply to | #1715926 |
Commit-ID: ac0bb6b72f4bbab08f270a919406d971e73698b5 Gitweb: http://git.kernel.org/tip/ac0bb6b72f4bbab08f270a919406d971e73698b5 Author: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> AuthorDate: Sun, 20 Aug 2017 14:39:20 +0300 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Tue, 22 Aug 2017 13:24:54 -0300 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> --- Documentation/sysctl/kernel.txt | 13 ++++++++++++- tools/perf/util/evsel.c | 4 +++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index bac23c1..ce61d1f 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -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 diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 5dfb8bc..a5888c7 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -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"
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web