[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-19422a9f2a3be7f3a046285ffae4cbb571aa853a@git.kernel.org>
Date: Sat, 19 May 2018 04:48:10 -0700
From: tip-bot for Adrian Hunter <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: joro@...tes.org, ak@...ux.intel.com, mingo@...nel.org,
jolsa@...nel.org, linux-kernel@...r.kernel.org,
peterz@...radead.org, tglx@...utronix.de,
alexander.shishkin@...ux.intel.com, hpa@...or.com,
adrian.hunter@...el.com, acme@...hat.com,
dave.hansen@...ux.intel.com, luto@...nel.org
Subject: [tip:perf/core] perf tools: Fix kernel_start for PTI on x86
Commit-ID: 19422a9f2a3be7f3a046285ffae4cbb571aa853a
Gitweb: https://git.kernel.org/tip/19422a9f2a3be7f3a046285ffae4cbb571aa853a
Author: Adrian Hunter <adrian.hunter@...el.com>
AuthorDate: Thu, 17 May 2018 12:21:54 +0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Sat, 19 May 2018 06:42:51 -0300
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 <adrian.hunter@...el.com>
Tested-by: Jiri Olsa <jolsa@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Joerg Roedel <joro@...tes.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: x86@...nel.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@...hat.com>
---
tools/perf/util/machine.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 107bae7676b1..e011a7160380 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -2321,7 +2321,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;
Powered by blists - more mailing lists