Skip to content

Commit 19422a9

Browse files
ahunter6acmel
authored andcommitted
perf tools: Fix kernel_start for PTI on x86
Opickn 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 <[email protected]> Tested-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Dave Hansen <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent dbbd34a commit 19422a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/perf/util/machine.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2321,7 +2321,12 @@ int machine__get_kernel_start(struct machine *machine)
23212321
machine->kernel_start = 1ULL << 63;
23222322
if (map) {
23232323
err = map__load(map);
2324-
if (!err)
2324+
/*
2325+
* On x86_64, PTI entry trampolines are less than the
2326+
* start of kernel text, but still above 2^63. So leave
2327+
* kernel_start = 1ULL << 63 for x86_64.
2328+
*/
2329+
if (!err && !machine__is(machine, "x86_64"))
23252330
machine->kernel_start = map->start;
23262331
}
23272332
return err;

0 commit comments

Comments
 (0)