kernel-fxtec-pro1x/tools/perf/util
Adrian Hunter 37c6f80898 perf probe: Fix getting the kernel map
commit eaeffeb9838a7c0dec981d258666bfcc0fa6a947 upstream.

Since commit 4d99e41365 ("perf machine: Workaround missing maps for
x86 PTI entry trampolines"), perf tools has been creating more than one
kernel map, however 'perf probe' assumed there could be only one.

Fix by using machine__kernel_map() to get the main kernel map.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiufei Xue <jiufei.xue@linux.alibaba.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Cc: Xu Yu <xuyu@linux.alibaba.com>
Fixes: 4d99e41365 ("perf machine: Workaround missing maps for x86 PTI entry trampolines")
Fixes: d83212d5dd ("kallsyms, x86: Export addresses of PTI entry trampolines")
Link: http://lkml.kernel.org/r/2ed432de-e904-85d2-5c36-5897ddc5b23b@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-27 14:14:40 +09:00
..
c++ perf tools: Fix a clang 7.0 compilation error 2018-06-25 11:59:37 -03:00
cs-etm-decoder perf cs-etm: Fix start tracing packet handling 2018-07-31 10:57:56 -03:00
include
intel-pt-decoder perf intel-pt: Fix overlap calculation for padding 2019-03-23 20:10:11 +01:00
libunwind
scripting-engines perf script: Use fallbacks for branch stacks 2019-01-09 17:38:42 +01:00
annotate.c perf annotate: Fix parsing aarch64 branch instructions after objdump update 2018-08-30 15:51:54 -03:00
annotate.h perf annotate: Fix parsing aarch64 branch instructions after objdump update 2018-08-30 15:51:54 -03:00
arm-spe-pkt-decoder.c
arm-spe-pkt-decoder.h
arm-spe.c
arm-spe.h
auxtrace.c perf auxtrace: Define auxtrace record alignment 2019-03-23 20:10:11 +01:00
auxtrace.h perf auxtrace: Define auxtrace record alignment 2019-03-23 20:10:11 +01:00
block-range.c
block-range.h
bpf-loader.c perf bpf: Make bpf__setup_output_event() return the bpf-output event 2018-08-08 15:55:58 -03:00
bpf-loader.h perf bpf: Make bpf__setup_output_event() return the bpf-output event 2018-08-08 15:55:58 -03:00
bpf-prologue.c docs: Fix some broken references 2018-06-15 18:10:01 -03:00
bpf-prologue.h
branch.c
branch.h
Build perf auxtrace: Support for perf report -D for s390 2018-08-03 10:34:18 -03:00
build-id.c perf thread: Make thread__find_map() return the map 2018-04-26 13:47:08 -03:00
build-id.h
cache.h
call-path.c
call-path.h
callchain.c perf report: Fix wrong iteration count in --branch-history 2019-02-20 10:25:39 +01:00
callchain.h perf report: Fix wrong iteration count in --branch-history 2019-02-20 10:25:39 +01:00
cgroup.c perf cgroup: Make evlist__find_cgroup() more compact 2018-06-04 10:28:50 -03:00
cgroup.h
cloexec.c
cloexec.h
color.c
color.h
comm.c perf tools: Fix struct comm_str removal crash 2018-07-24 14:54:03 -03:00
comm.h
compress.h perf tools: Add is_compressed callback to compressions array 2018-08-20 08:54:59 -03:00
config.c perf config: Call perf_config__init() lazily 2018-05-16 16:11:09 -03:00
config.h perf config: Call perf_config__init() lazily 2018-05-16 16:11:09 -03:00
counts.c
counts.h
cpumap.c perf tools: Handle TOPOLOGY headers with no CPU 2019-03-13 14:02:26 -07:00
cpumap.h
cs-etm.c perf cs-etm: Correct packets swapping in cs_etm__flush() 2019-01-26 09:32:41 +01:00
cs-etm.h coresight: Move to SPDX identifier 2018-04-19 12:29:41 -03:00
ctype.c
data-convert-bt.c tools lib traceevent, perf tools: Rename pevent_read_number_* APIs 2018-08-13 15:22:05 -03:00
data-convert-bt.h
data-convert.h
data.c
data.h
db-export.c perf symbols: Unify symbol maps 2018-04-27 10:47:06 -03:00
db-export.h
debug.c perf debug: Avoid setting 'quiet' to 'true' unnecessarily 2018-03-16 16:39:02 -03:00
debug.h
demangle-java.c
demangle-java.h
demangle-rust.c
demangle-rust.h
drv_configs.c
drv_configs.h
dso.c perf dso: Fix unchecked usage of strncpy() 2019-02-12 19:47:11 +01:00
dso.h perf tools: Remove ext from struct kmod_path 2018-08-20 08:54:59 -03:00
dump-insn.c
dump-insn.h
dwarf-aux.c perf config: Rename to HAVE_DWARF_GETLOCATIONS_SUPPORT 2018-04-02 13:50:24 -03:00
dwarf-aux.h
dwarf-regs.c
env.c perf env: Also consider env->arch == NULL as local operation 2019-01-09 17:38:43 +01:00
env.h perf machine: Add nr_cpus_avail() 2018-05-22 10:52:49 -03:00
event.c perf tools: Use fallback for sample_addr_correlates_sym() cases 2019-01-09 17:38:42 +01:00
event.h perf machine: Synthesize and process mmap events for x86 PTI entry trampolines 2018-05-23 10:26:39 -03:00
evlist.c perf tools: Add missing sigqueue() prototype for systems lacking it 2019-01-26 09:32:41 +01:00
evlist.h perf evlist: Introduce force_leader() method 2018-05-21 14:40:54 -03:00
evsel.c perf tools: Fix crash on synthesizing the unit 2018-12-17 09:24:31 +01:00
evsel.h perf annotate: Loop group events directly in annotation__calc_percent() 2018-08-08 15:55:47 -03:00
evsel_fprintf.c
expr.h
expr.y
find-vdso-map.c
genelf.c perf tools: Fix spelling mistake: "builid" -> "buildid" 2018-04-30 12:02:03 -03:00
genelf.h
genelf_debug.c
generate-cmdlist.sh perf tools: Rename HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT 2018-04-12 10:33:31 -03:00
group.h
header.c perf header: Fix up argument to ctime() 2019-02-12 19:47:12 +01:00
header.h perf tools: Fix the build on the alpine:edge distro 2018-07-30 13:15:03 -03:00
help-unknown-cmd.c
help-unknown-cmd.h
hist.c perf hists: Reimplement hists__has_callchains() 2018-06-07 14:42:27 -03:00
hist.h perf hists: Clarify callchain disabling when available 2018-07-24 14:37:33 -03:00
intel-bts.c perf intel-pt/bts: Calculate cpumode for synthesized samples 2018-11-21 09:19:19 +01:00
intel-bts.h
intel-pt.c perf intel-pt: Fix divide by zero when TSC is not available 2019-03-23 20:10:11 +01:00
intel-pt.h
intlist.c
intlist.h
jit.h
jitdump.c
jitdump.h
kvm-stat.h
levenshtein.c
levenshtein.h
llvm-utils.c perf llvm: Allow passing options to llc in addition to clang 2018-08-20 08:54:58 -03:00
llvm-utils.h perf llvm: Allow passing options to llc in addition to clang 2018-08-20 08:54:58 -03:00
lzma.c perf tools: Add lzma_is_compressed function 2018-08-20 08:54:59 -03:00
machine.c perf report: Fix wrong iteration count in --branch-history 2019-02-20 10:25:39 +01:00
machine.h perf thread: Add fallback functions for cases where cpumode is insufficient 2019-01-09 17:38:42 +01:00
map.c perf tools: Fix maps__find_symbol_by_name() 2018-09-11 14:12:51 -03:00
map.h perf map: Optimize maps__fixup_overlappings() 2018-08-08 15:56:00 -03:00
mem-events.c
mem-events.h
mem2node.c
mem2node.h
memswap.c
memswap.h
metricgroup.c perf list: Unify metric group description format with PMU event description 2018-07-31 11:35:44 -03:00
metricgroup.h perf stat: Add transaction flag (-T) support for s390 2018-07-24 14:49:37 -03:00
mmap.c perf mmap: Store real cpu number in 'struct perf_mmap' 2018-08-20 08:54:59 -03:00
mmap.h perf mmap: Store real cpu number in 'struct perf_mmap' 2018-08-20 08:54:59 -03:00
namespaces.c perf tools: Restore proper cwd on return from mnt namespace 2018-12-17 09:24:33 +01:00
namespaces.h perf tools: Restore proper cwd on return from mnt namespace 2018-12-17 09:24:33 +01:00
ordered-events.c
ordered-events.h
parse-branch-options.c
parse-branch-options.h
parse-events.c perf parse-events: Fix unchecked usage of strncpy() 2019-01-26 09:32:40 +01:00
parse-events.h perf parse-events: Handle uncore event aliases in small groups properly 2018-05-30 10:40:44 -03:00
parse-events.l perf record: Enable arbitrary event names thru name= modifier 2018-06-06 12:52:04 -03:00
parse-events.y perf tools: Fix error index for pmu event parser 2018-06-07 15:50:14 -03:00
parse-regs-options.c
parse-regs-options.h
path.c
path.h
perf-hooks-list.h
perf-hooks.c
perf-hooks.h
PERF-VERSION-GEN
perf_regs.c
perf_regs.h
pmu.c perf pmu: Suppress potential format-truncation warning 2019-01-09 17:38:42 +01:00
pmu.h
pmu.l
pmu.y
print_binary.c
print_binary.h
probe-event.c perf probe: Fix getting the kernel map 2019-03-27 14:14:40 +09:00
probe-event.h
probe-file.c perf probe: Fix unchecked usage of strncpy() 2019-02-12 19:47:11 +01:00
probe-file.h
probe-finder.c perf probe: Use right type to access array elements 2018-03-19 13:51:53 -03:00
probe-finder.h
pstack.c
pstack.h
python-ext-sources
python.c perf python: Do not force closing original perf descriptor in evlist.get_pollfd() 2019-02-12 19:47:18 +01:00
rb_resort.h
rblist.c
rblist.h
record.c
rwsem.c
rwsem.h
s390-cpumsf-kernel.h perf report: Add raw report support for s390 auxiliary trace 2018-08-08 15:26:48 -03:00
s390-cpumsf.c perf tools: Cast off_t to s64 to avoid warning on bionic libc 2019-02-12 19:47:12 +01:00
s390-cpumsf.h perf auxtrace: Support for perf report -D for s390 2018-08-03 10:34:18 -03:00
sane_ctype.h
session.c perf machine: Record if a arch has a single user/kernel address space 2019-01-09 17:38:42 +01:00
session.h
setns.c
setup.py perf python: Use -Wno-redundant-decls to build with PYTHON=python3 2018-10-05 11:11:55 -03:00
smt.c
smt.h
sort.c tools lib traceevent, perf tools: Rename pevent_read_number_* APIs 2018-08-13 15:22:05 -03:00
sort.h tools lib traceevent, perf tools: Rename struct pevent to struct tep_handle 2018-08-10 15:29:35 -03:00
srcline.c perf report: Don't crash on invalid inline debug information 2018-10-16 14:52:21 -03:00
srcline.h
stat-shadow.c perf stat: Get rid of extra clock display function 2018-07-24 14:54:58 -03:00
stat.c perf stat: Make function perf_stat_evsel_id_init static 2018-03-16 13:56:17 -03:00
stat.h perf stat: Add --table option to display time of each run 2018-04-26 09:30:27 -03:00
strbuf.c perf strbuf: Match va_{add,copy} with va_end 2018-11-13 11:08:22 -08:00
strbuf.h
strfilter.c
strfilter.h
string.c
string2.h
strlist.c
strlist.h
svghelper.c perf svghelper: Fix unchecked usage of strncpy() 2019-01-26 09:32:40 +01:00
svghelper.h
symbol-elf.c perf symbols: Filter out hidden symbols from labels 2019-03-13 14:02:37 -07:00
symbol-minimal.c perf symbols: Unify symbol maps 2018-04-27 10:47:06 -03:00
symbol.c perf tools: Fix split_kallsyms_for_kcore() for trampoline symbols 2019-03-23 20:10:11 +01:00
symbol.h perf annotate: Adopt anotation options from symbol_conf 2018-06-04 10:28:53 -03:00
symbol_fprintf.c perf symbols: Unify symbol maps 2018-04-27 10:47:06 -03:00
syscalltbl.c perf trace arm64: Use generated syscall table 2018-07-24 14:53:01 -03:00
syscalltbl.h
target.c
target.h
term.c
term.h
thread-stack.c perf intel-pt: Insert callchain context into synthesized callchains 2018-11-21 09:19:19 +01:00
thread-stack.h perf intel-pt: Insert callchain context into synthesized callchains 2018-11-21 09:19:19 +01:00
thread.c perf symbols: Unify symbol maps 2018-04-27 10:47:06 -03:00
thread.h perf thread: Add fallback functions for cases where cpumode is insufficient 2019-01-09 17:38:42 +01:00
thread_map.c
thread_map.h
time-utils.c
time-utils.h
tool.h
top.c
top.h perf annotate stdio: Use annotation_options consistently 2018-06-04 10:28:52 -03:00
trace-event-info.c perf tools: Cleanup trace-event-info 'tdata' leak 2018-11-13 11:08:22 -08:00
trace-event-parse.c perf tools: Free 'printk' string in parse_ftrace_printk() 2018-11-13 11:08:22 -08:00
trace-event-read.c perf tools: Free temporary 'sys' string in read_event_files() 2018-11-13 11:08:22 -08:00
trace-event-scripting.c tools lib traceevent, perf tools: Rename struct pevent to struct tep_handle 2018-08-10 15:29:35 -03:00
trace-event.c tools lib traceevent, perf tools: Rename 'enum pevent_flag' to 'enum tep_flag' 2018-08-13 15:22:18 -03:00
trace-event.h tools lib traceevent, perf tools: Rename pevent alloc / free APIs 2018-08-13 15:21:43 -03:00
trigger.h
tsc.c
tsc.h
units.c
units.h
unwind-libdw.c perf unwind: Take pgoff into account when reporting elf to libdwfl 2018-11-27 16:12:59 +01:00
unwind-libdw.h
unwind-libunwind-local.c perf script: Show correct offsets for DWARF-based unwinding 2018-07-24 14:53:11 -03:00
unwind-libunwind.c
unwind.h
usage.c
util-cxx.h
util.c perf tools: No need to unconditionally read the max_stack sysctls 2018-05-17 16:31:32 -03:00
util.h perf tools: No need to unconditionally read the max_stack sysctls 2018-05-17 16:31:32 -03:00
values.c
values.h
vdso.c perf map: Remove enum_type arg to map_groups__first() 2018-04-26 13:47:15 -03:00
vdso.h
xyarray.c
xyarray.h
zlib.c perf tools: Add gzip_is_compressed function 2018-08-20 08:54:59 -03:00