diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2021-06-05 00:30:58 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-06-04 15:43:37 -0300 |
commit | f4f1c42953c7f03a35cd7bc49c16f35911f50a0a (patch) | |
tree | 6819cd76c96fcb9672fc38b14a72273e4e11817c /tools/perf/util/srccode.c | |
parent | fe4f3eb1fd5ab4bec5f105ef6e51bacac698af3b (diff) |
perf probe: Report possible permission error for map__load() failure
Report possible permission error including kptr_restrict setting
for map__load() failure. This can happen when non-superuser runs
perf probe.
With this patch, perf probe shows the following message.
$ perf probe vfs_read
Failed to load symbols from /proc/kallsyms
Please ensure you can read the /proc/kallsyms symbol addresses.
If the /proc/sys/kernel/kptr_restrict is '2', you can not read
kernel symbol address even if you are a superuser. Please change
it to '1'. If kptr_restrict is '1', the superuser can read the
symbol addresses.
In that case, please run this command again with sudo.
Error: Failed to add events.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Link: http://lore.kernel.org/lkml/162282065877.448336.10047912688119745151.stgit@devnote2
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/srccode.c')
0 files changed, 0 insertions, 0 deletions