android_kernel_samsung_univ.../tools/perf/tests
Jiri Olsa 56973cff1a perf tests: Use arch__compare_symbol_names to compare symbols
[ Upstream commit ab6e9a99345131cd8e54268d1d0dc04a33f7ed11 ]

The symbol search called by machine__find_kernel_symbol_by_name is using
internally arch__compare_symbol_names function to compare 2 symbol
names, because different archs have different ways of comparing symbols.
Mostly for skipping '.' prefixes and similar.

In test 1 when we try to find matching symbols in kallsyms and vmlinux,
by address and by symbol name. When either is found we compare the pair
symbol names  by simple strcmp, which is not good enough for reasons
explained in previous paragraph.

On powerpc this can cause lockup, because even thought we found the
pair, the compared names are different and don't match simple strcmp.
Following code path is executed, that leads to lockup:

   - we find the pair in kallsyms by sym->start
next_pair:
   - we compare the names and it fails
   - we find the pair by sym->name
   - the pair addresses match so we call goto next_pair
     because we assume the names match in this case

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: 031b84c407 ("perf probe ppc: Enable matching against dot symbols automatically")
Link: http://lkml.kernel.org/r/20180215122635.24029-10-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:49:16 +02:00
..
attr
.gitignore perf test: Add llvm-src-base.c and llvm-src-kbuild.c to .gitignore 2015-11-11 18:41:23 -03:00
attr.c perf test attr: Fix ignored test case result 2017-12-09 18:42:41 +01:00
attr.py
bp_signal_overflow.c
bp_signal.c
bpf-script-example.c perf test: Enhance the LLVM test: update basic BPF test program 2015-11-06 17:49:24 -03:00
bpf-script-test-kbuild.c perf test: Enhance the LLVM tests: add kbuild test 2015-11-06 17:49:50 -03:00
bpf.c perf test: Fix build of BPF and LLVM on older glibc libraries 2016-06-01 12:15:47 -07:00
Build perf test: Add 'perf test BPF' 2015-11-06 17:50:03 -03:00
builtin-test.c perf test: Do not be case sensitive when searching for matching tests 2015-11-06 17:50:04 -03:00
code-reading.c Revert "perf tests: Decompress kernel module before objdump" 2018-04-24 09:32:03 +02:00
dso-data.c
dwarf-unwind.c perf tests: Move x86 tests into arch directory 2015-10-05 16:55:43 -03:00
evsel-roundtrip-name.c
evsel-tp-sched.c perf evsel: Propagate error info from tp_format 2015-09-15 09:48:33 -03:00
fdarray.c
hists_common.c
hists_common.h
hists_cumulate.c
hists_filter.c perf test: Add entry for hists socket filter 2015-09-14 13:04:10 -03:00
hists_link.c
hists_output.c
keep-tracking.c perf test: Keep test result clean if '-v' not set 2015-11-03 11:45:40 -03:00
kmod-path.c perf tests kmod-path: Don't fail if compressed modules aren't supported 2018-03-24 10:58:46 +01:00
llvm.c perf test: Fix build of BPF and LLVM on older glibc libraries 2016-06-01 12:15:47 -07:00
llvm.h perf test: Enhance the LLVM tests: add kbuild test 2015-11-06 17:49:50 -03:00
make perf tools: Allow shuffling the build tests 2015-11-05 11:39:54 -03:00
mmap-basic.c perf evsel: Propagate error info from tp_format 2015-09-15 09:48:33 -03:00
mmap-thread-lookup.c
openat-syscall-all-cpus.c perf test: Silence tracepoint event failures 2015-10-19 14:57:49 -03:00
openat-syscall-tp-fields.c perf test: Silence tracepoint event failures 2015-10-19 14:57:49 -03:00
openat-syscall.c perf test: Silence tracepoint event failures 2015-10-19 14:57:49 -03:00
parse-events.c perf tests: Avoid possible truncation with dirent->d_name + snprintf 2017-07-15 11:57:48 +02:00
parse-no-sample-id-all.c
perf-record.c
perf-targz-src-pkg
pmu.c
python-use.c
sample-parsing.c
sw-clock.c perf tests: Fix software clock events test setting maps 2015-09-15 11:04:49 -03:00
switch-tracking.c perf test: Keep test result clean if '-v' not set 2015-11-03 11:45:40 -03:00
task-exit.c perf tests: Fix task exit test setting maps 2015-09-15 11:03:58 -03:00
tests.h perf test: Add 'perf test BPF' 2015-11-06 17:50:03 -03:00
thread-map.c
thread-mg-share.c
topology.c perf cpu_map: Add data arg to cpu_map__build_map callback 2015-10-19 18:04:01 -03:00
vmlinux-kallsyms.c perf tests: Use arch__compare_symbol_names to compare symbols 2018-05-30 07:49:16 +02:00