OSDN Git Service

perf machine: Workaround missing maps for x86 PTI entry trampolines
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 22 May 2018 10:54:33 +0000 (13:54 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 22 May 2018 13:54:22 +0000 (10:54 -0300)
commit4d99e4136580d178e3523281a820be17bf814bf8
treed1f02c7784460d529d50ef1014197ff47d2cc07b
parent9cecca325ea879c84fcd31a5e609a514c1a1dbd1
perf machine: Workaround missing maps for x86 PTI entry trampolines

On x86_64 the PTI entry trampolines are not in the kernel map created by
perf tools. That results in the addresses having no symbols and prevents
annotation.  It also causes Intel PT to have decoding errors at the
trampoline addresses.

Workaround that by creating maps for the trampolines.

At present the kernel does not export information revealing where the
trampolines are.  Until that happens, the addresses are hardcoded.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/1526986485-6562-6-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/machine.c
tools/perf/util/machine.h
tools/perf/util/symbol.c