linux-stable/tools/perf
Adrian Hunter 45210e1ada perf dlfilter: Avoid leak in v0 API test use of resolve_address()
The introduction of reference counting causes the v0 API
perf_dlfilter_fns.resolve_address() to leak.

v2 API introduced perf_dlfilter_fns.al_cleanup() to prevent that.

For the v0 API, avoid the leak by exiting the addr_location immediately,
since the documentation makes it clear that pointers obtained via
perf_dlfilter_fns are not necessarily valid (dereferenceable) after
'filter_event' and 'filter_event_early' return.

Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Closes: https://lore.kernel.org/oe-lkp/202308232146.94d82cb4-oliver.sang@intel.com
Link: http://lore.kernel.org/lkml/20230830090539.68206-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2023-08-30 23:03:03 -03:00
..
arch perf pmu: Remove logic for PMU name being NULL 2023-08-25 10:22:16 -03:00
bench perf pmu: Abstract alias/event struct 2023-08-24 10:42:46 -03:00
dlfilters perf dlfilter: Add al_cleanup() 2023-08-15 16:41:49 -03:00
Documentation perf docs: Fix format of unordered lists 2023-08-16 08:37:49 -03:00
include/perf perf dlfilter: Add al_cleanup() 2023-08-15 16:41:49 -03:00
jvmti
pmu-events perf jevents: Use "default_core" for events with no Unit 2023-08-29 14:16:15 -03:00
python
scripts perf scripts python gecko: Launch the profiler UI on the default browser with the appropriate URL 2023-08-24 14:41:49 -03:00
tests perf metric: Add #num_cpus_online literal 2023-08-30 23:03:03 -03:00
trace perf beauty mmap_flags: Use "test -f" instead of "[-f FILE]" 2023-08-29 14:15:21 -03:00
ui perf tui slang: Tidy casts 2023-08-25 10:24:55 -03:00
util perf dlfilter: Avoid leak in v0 API test use of resolve_address() 2023-08-30 23:03:03 -03:00
.gitignore
Build
builtin-annotate.c perf addr_location: Add init/exit/copy functions 2023-06-12 15:57:53 -03:00
builtin-bench.c perf bench uprobe trace_printk: Add entry attaching an BPF program that does a trace_printk 2023-07-20 11:33:24 -03:00
builtin-buildid-cache.c
builtin-buildid-list.c perf util: Move input_name to util 2023-04-10 19:21:31 -03:00
builtin-c2c.c perf callchain: Use pthread keys for tls callchain_cursor 2023-06-12 15:57:54 -03:00
builtin-config.c perf path: Make mkpath thread safe, remove 16384 bytes from .bss 2023-05-28 10:24:14 -03:00
builtin-daemon.c perf tools: Add missing else to cmd_daemon subcommand condition 2023-06-27 12:09:44 -07:00
builtin-data.c perf util: Move input_name to util 2023-04-10 19:21:31 -03:00
builtin-diff.c perf diff: Replaces some ',' as separator with the more usual ';' 2023-07-20 11:43:45 -03:00
builtin-evlist.c perf util: Move input_name to util 2023-04-10 19:21:31 -03:00
builtin-ftrace.c perf tools fixes for v6.4: 2nd batch 2023-05-31 15:31:56 -03:00
builtin-help.c perf path: Make mkpath thread safe, remove 16384 bytes from .bss 2023-05-28 10:24:14 -03:00
builtin-inject.c perf inject: Lazily allocate guest_event event_buf 2023-06-12 18:18:14 -03:00
builtin-kallsyms.c perf symbol: Remove now unused symbol_conf.sort_by_name 2023-06-23 21:48:49 -07:00
builtin-kmem.c perf callchain: Use pthread keys for tls callchain_cursor 2023-06-12 15:57:54 -03:00
builtin-kvm.c perf evsel: Introduce evsel__name_is() method to check if the evsel name is equal to a given string 2023-04-24 14:28:11 -03:00
builtin-kwork.c perf callchain: Use pthread keys for tls callchain_cursor 2023-06-12 15:57:54 -03:00
builtin-list.c perf pmus: Skip duplicate PMUs and don't print list suffix by default 2023-08-29 14:16:14 -03:00
builtin-lock.c perf lock contention: Fix typo in max-stack option description 2023-08-25 10:27:07 -03:00
builtin-mem.c perf addr_location: Add init/exit/copy functions 2023-06-12 15:57:53 -03:00
builtin-probe.c perf probe: Dynamically allocate params memory 2023-05-28 10:24:02 -03:00
builtin-record.c perf parse-events: Remove BPF event support 2023-08-15 16:41:48 -03:00
builtin-report.c perf symbol: Remove now unused symbol_conf.sort_by_name 2023-06-23 21:48:49 -07:00
builtin-sched.c perf sched: Avoid large stack allocations 2023-06-12 18:18:14 -03:00
builtin-script.c perf script: Print "cgroup" field on the same line as "comm" 2023-08-08 11:21:11 -03:00
builtin-stat.c perf stat: Add missing newline in pr_err messages 2023-06-20 15:55:13 -07:00
builtin-timechart.c perf addr_location: Add init/exit/copy functions 2023-06-12 15:57:53 -03:00
builtin-top.c perf top: Don't pass an ERR_PTR() directly to perf_session__delete() 2023-08-17 14:13:04 -03:00
builtin-trace.c perf trace: Use heuristic when deciding if a syscall tracepoint "const char *" field is really a string 2023-08-18 16:33:28 -03:00
builtin-version.c Revert "perf build: Make BUILD_BPF_SKEL default, rename to NO_BPF_SKEL" 2023-05-06 18:07:37 -03:00
builtin.h perf usage: Move usage strings 2023-04-10 19:20:53 -03:00
check-headers.sh perf build: Fix shellcheck issue about quotes for check-headers.sh 2023-08-03 17:01:26 -03:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf parse-events: Remove BPF event support 2023-08-15 16:41:48 -03:00
Makefile.perf perf build: Allow customization of clang options for BPF target 2023-08-23 15:33:18 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf parse-events: Remove BPF event support 2023-08-15 16:41:48 -03:00
perf.h perf util: Move perf_guest/host declarations 2023-04-10 19:22:05 -03:00