lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 22 Mar 2019 15:01:55 -0700 From: tip-bot for Adrian Hunter <tipbot@...or.com> To: linux-tip-commits@...r.kernel.org Cc: jiufei.xue@...ux.alibaba.com, alexander.shishkin@...ux.intel.com, adrian.hunter@...el.com, peterz@...radead.org, linux-kernel@...r.kernel.org, hpa@...or.com, gregkh@...uxfoundation.org, xuyu@...ux.alibaba.com, acme@...hat.com, joseph.qi@...ux.alibaba.com, mhiramat@...nel.org, mingo@...nel.org, luto@...nel.org, tglx@...utronix.de Subject: [tip:perf/urgent] perf probe: Fix getting the kernel map Commit-ID: eaeffeb9838a7c0dec981d258666bfcc0fa6a947 Gitweb: https://git.kernel.org/tip/eaeffeb9838a7c0dec981d258666bfcc0fa6a947 Author: Adrian Hunter <adrian.hunter@...el.com> AuthorDate: Mon, 4 Mar 2019 15:13:21 +0200 Committer: Arnaldo Carvalho de Melo <acme@...hat.com> CommitDate: Mon, 11 Mar 2019 11:56:03 -0300 perf probe: Fix getting the kernel map Since commit 4d99e4136580 ("perf machine: Workaround missing maps for x86 PTI entry trampolines"), perf tools has been creating more than one kernel map, however 'perf probe' assumed there could be only one. Fix by using machine__kernel_map() to get the main kernel map. Signed-off-by: Adrian Hunter <adrian.hunter@...el.com> Tested-by: Joseph Qi <joseph.qi@...ux.alibaba.com> Acked-by: Masami Hiramatsu <mhiramat@...nel.org> Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com> Cc: Andy Lutomirski <luto@...nel.org> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org> Cc: Jiufei Xue <jiufei.xue@...ux.alibaba.com> Cc: Peter Zijlstra <peterz@...radead.org> Cc: stable@...r.kernel.org Cc: Xu Yu <xuyu@...ux.alibaba.com> Fixes: 4d99e4136580 ("perf machine: Workaround missing maps for x86 PTI entry trampolines") Fixes: d83212d5dd67 ("kallsyms, x86: Export addresses of PTI entry trampolines") Link: http://lkml.kernel.org/r/2ed432de-e904-85d2-5c36-5897ddc5b23b@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com> --- tools/perf/util/probe-event.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index a1b8d9649ca7..198e09ff611e 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -160,8 +160,10 @@ static struct map *kernel_get_module_map(const char *module) if (module && strchr(module, '/')) return dso__new_map(module); - if (!module) - module = "kernel"; + if (!module) { + pos = machine__kernel_map(host_machine); + return map__get(pos); + } for (pos = maps__first(maps); pos; pos = map__next(pos)) { /* short_name is "[module]" */
Powered by blists - more mailing lists