linux/tools/perf
Masami Hiramatsu 1efde27542 perf probe: Do not depend on dwfl_module_addrsym()
Do not depend on dwfl_module_addrsym() because it can fail on user-space
shared libraries.

Actually, same bug was fixed by commit 664fee3dc3 ("perf probe: Do not
use dwfl_module_addrsym if dwarf_diename finds symbol name"), but commit
07d3698578 ("perf probe: Fix wrong address verification) reverted to
get actual symbol address from symtab.

This fixes it again by getting symbol address from DIE, and only if the
DIE has only address range, it uses dwfl_module_addrsym().

Fixes: 07d3698578 ("perf probe: Fix wrong address verification)
Reported-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Alexandre Ghiti <alex@ghiti.fr>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sashal@kernel.org>
Link: http://lore.kernel.org/lkml/158281812176.476.14164573830975116234.stgit@devnote2
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-03-09 10:43:53 -03:00
..
arch tools: Fix off-by 1 relative directory includes 2020-03-06 08:36:46 -03:00
bench perf bench: Clear struct sigaction before sigaction() syscall 2020-03-06 08:30:47 -03:00
Documentation perf config: Document missing config options 2020-02-27 10:45:19 -03:00
examples/bpf Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
include/bpf perf bpf: Remove bpf/ subdir from bpf.h headers used to build bpf events 2020-02-18 10:13:28 -03:00
jvmti perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy() 2019-10-15 11:47:38 -03:00
pmu-events perf jevents: Fix leak of mapfile memory 2020-03-06 08:30:47 -03:00
python treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 407 2019-06-05 17:37:14 +02:00
scripts perf scripts python: exported-sql-viewer.py: Fix use of TRUE with SQLite 2019-11-13 09:13:16 -03:00
tests perf tests bp_account: Make global variable static 2020-03-02 11:15:07 -03:00
trace perf beauty prctl: Export the 'options' strarray 2020-02-11 16:41:50 -03:00
ui perf annotate: Remove privsize from symbol__annotate() args 2020-02-27 11:06:14 -03:00
util perf probe: Do not depend on dwfl_module_addrsym() 2020-03-09 10:43:53 -03:00
.gitignore perf: Update .gitignore file 2019-08-31 22:27:52 -03:00
Build perf tools: Rename build libperf to perf 2019-02-14 15:18:08 -03:00
builtin-annotate.c perf annotate: Prefer cmdline option over default config 2020-02-27 10:45:08 -03:00
builtin-bench.c perf tools: Remove perf.h from source files not needing it 2019-08-29 17:38:32 -03:00
builtin-buildid-cache.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-buildid-list.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-c2c.c perf c2c: Fix return type for histogram sorting comparision functions 2020-01-14 13:29:21 -03:00
builtin-config.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
builtin-data.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
builtin-diff.c perf diff: Fix undefined string comparision spotted by clang's -Wstring-compare 2020-03-06 08:30:29 -03:00
builtin-evlist.c perf evsel: Introduce evsel_fprintf.h 2019-09-25 16:26:34 -03:00
builtin-ftrace.c perf auxtrace: Uninline functions that touch perf_session 2019-08-31 22:24:10 -03:00
builtin-help.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
builtin-inject.c perf inject: Fix processing of ID index for injected instruction tracing 2019-12-04 12:39:53 -03:00
builtin-kallsyms.c perf dsos: Move the dsos struct and its methods to separate source files 2019-08-31 22:24:10 -03:00
builtin-kmem.c perf callchain: Use 'struct map_symbol' in 'struct callchain_cursor_node' 2019-11-12 08:20:53 -03:00
builtin-kvm.c perf kvm: Use evlist layer api when possible 2019-11-06 15:43:05 -03:00
builtin-list.c perf list: Hide deprecated events by default 2019-10-19 15:35:01 -03:00
builtin-lock.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-mem.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-probe.c perf probe: Check return value of strlist__add() for -ENOMEM 2020-02-27 11:03:13 -03:00
builtin-record.c perf record: Adapt affinity to machines with #CPUs > 1K 2020-01-06 11:46:09 -03:00
builtin-report.c perf annotate: Make perf config effective 2020-02-27 10:44:59 -03:00
builtin-sched.c perf sched timehist: Add support for filtering on CPU 2020-01-06 11:46:09 -03:00
builtin-script.c perf script: Fix invalid LBR/binary mismatch error 2019-11-28 08:08:38 -03:00
builtin-stat.c perf stat: Use affinity for reading 2019-11-29 12:20:45 -03:00
builtin-timechart.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-top.c perf top: Fix stdio interface input handling with glibc 2.28+ 2020-03-06 08:30:47 -03:00
builtin-trace.c perf trace: Resolve prctl's 'option' arg strings to numbers 2020-02-11 16:41:50 -03:00
builtin-version.c perf symbols: Move mem_info and branch_info out of symbol.h 2019-08-31 22:27:48 -03:00
builtin.h perf tools: Remove needless util.h include from builtin.h 2019-08-28 17:19:34 -03:00
check-headers.sh tools include UAPI: Sync x86's syscalls_64.tbl, generic unistd.h and fcntl.h to pick up openat2 and pidfd_getfd 2020-02-11 16:41:06 -03:00
command-list.txt
CREDITS
design.txt perf/doc: Update design.txt for exclude_{host|guest} flags 2019-01-21 11:01:18 +01:00
Makefile tools: Let O= makes handle a relative path with -C option 2020-03-06 17:08:28 -03:00
Makefile.config libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
Makefile.perf libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
MANIFEST libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
perf-archive.sh
perf-completion.sh
perf-read-vdso.c perf tools: Make find_vdso_map() more modular 2019-01-08 13:28:13 -03:00
perf-sys.h perf tools: Make usage of test_attr__* optional for perf-sys.h 2019-10-31 21:38:41 +01:00
perf-with-kcore.sh Merge branch 'x86/cpu' into perf/core, to pick up dependent changes 2019-06-17 12:29:16 +02:00
perf.c libperf: Merge libperf_set_print() into libperf_init() 2019-09-25 09:51:49 -03:00
perf.h perf time-utils: Adopt rdclock() from perf.h 2019-08-29 17:38:32 -03:00