Skip to content

Commit 4b0297e

Browse files
Alexey Budankovacmel
authored andcommitted
perf evsel: Extend message to mention CAP_SYS_PTRACE and perf security doc link
Adjust limited access message to mention CAP_SYS_PTRACE capability for processes of unprivileged users. Add link to perf security document in the end of the section about capabilities. The change has been inspired by this discussion: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Alexey Budankov <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 347a738 commit 4b0297e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/perf/util/evsel.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,8 +2502,10 @@ int evsel__open_strerror(struct evsel *evsel, struct target *target,
25022502

25032503
return scnprintf(msg + printed, size - printed,
25042504
"Consider adjusting /proc/sys/kernel/perf_event_paranoid setting to open\n"
2505-
"access to performance monitoring and observability operations for users\n"
2506-
"without CAP_PERFMON or CAP_SYS_ADMIN Linux capability.\n"
2505+
"access to performance monitoring and observability operations for processes\n"
2506+
"without CAP_PERFMON, CAP_SYS_PTRACE or CAP_SYS_ADMIN Linux capability.\n"
2507+
"More information can be found at 'Perf events and tool security' document:\n"
2508+
"https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html\n"
25072509
"perf_event_paranoid setting is %d:\n"
25082510
" -1: Allow use of (almost) all events by all users\n"
25092511
" Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK\n"

0 commit comments

Comments
 (0)