]> git.baikalelectronics.ru Git - kernel.git/commit
perf machine: Do not bail out if not managing to read ref reloc symbol
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 17 May 2016 14:52:26 +0000 (11:52 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 20 May 2016 14:43:54 +0000 (11:43 -0300)
commit690804f2e856b02a9b1f6e1190cfbefde10f42e8
treeeff08ab0ba5d9ffeddbe656e6072ef02d6e0334a
parentea86838e15b8e88b91ff4ea275c42d3e478313e4
perf machine: Do not bail out if not managing to read ref reloc symbol

This means the user can't access /proc/kallsyms, for instance, because
/proc/sys/kernel/kptr_restrict is set to 1.

Instead leave the ref_reloc_sym as NULL and code using it will cope.

This allows 'perf trace' to work on such systems for !root, the only
issue would be when trying to resolve kernel symbols, which happens,
for instance, in some libtracevent plugins.  A warning for that case
will be provided in the next patch in this series.

Noticed in Ubuntu 16.04, that comes with kptr_restrict=1.

Reported-by: Milian Wolff <milian.wolff@kdab.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-knpu3z4iyp2dxpdfm798fac4@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/machine.c