Commit 4edc059bac38f8cb59a8e539fb36fe0b8d19c55e
Committed by
Greg Kroah-Hartman
1 parent
e404a6294a
Exists in
smarc_8mm_imx_4.14.98_2.0.0_ga
and in
4 other branches
perf tools: Fix kernel_start for PTI on x86
commit 19422a9f2a3be7f3a046285ffae4cbb571aa853a upstream. On x86_64, PTI entry trampolines are less than the start of kernel text, but still above 2^63. So leave kernel_start = 1ULL << 63 for x86_64. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Jiri Olsa <jolsa@kernel.org> 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: 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/1526548928-20790-7-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Showing 1 changed file with 6 additions and 1 deletions Side-by-side Diff
tools/perf/util/machine.c
... | ... | @@ -2263,7 +2263,12 @@ |
2263 | 2263 | machine->kernel_start = 1ULL << 63; |
2264 | 2264 | if (map) { |
2265 | 2265 | err = map__load(map); |
2266 | - if (!err) | |
2266 | + /* | |
2267 | + * On x86_64, PTI entry trampolines are less than the | |
2268 | + * start of kernel text, but still above 2^63. So leave | |
2269 | + * kernel_start = 1ULL << 63 for x86_64. | |
2270 | + */ | |
2271 | + if (!err && !machine__is(machine, "x86_64")) | |
2267 | 2272 | machine->kernel_start = map->start; |
2268 | 2273 | } |
2269 | 2274 | return err; |