mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
perf tools: Fix kernel_start for PTI on x86
commit 19422a9f2a
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>
This commit is contained in:
parent
e404a6294a
commit
4edc059bac
1 changed files with 6 additions and 1 deletions
|
@ -2263,7 +2263,12 @@ int machine__get_kernel_start(struct machine *machine)
|
|||
machine->kernel_start = 1ULL << 63;
|
||||
if (map) {
|
||||
err = map__load(map);
|
||||
if (!err)
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
if (!err && !machine__is(machine, "x86_64"))
|
||||
machine->kernel_start = map->start;
|
||||
}
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue