diff options
| author | Ihor Solodrai <ihor.solodrai@linux.dev> | 2026-02-23 11:07:25 -0800 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-02-24 08:19:49 -0800 |
| commit | a1a771bd649212ef32cf9b0bcc63213a762d354a (patch) | |
| tree | 244de2bee6d9cf8dca4f845eabd2fed0d4660a91 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 45897ced3c1d3940fb5b68fe48c9e144143ae0ae (diff) | |
selftests/bpf: Refactor bpf_get_ksyms() trace helper
ASAN reported a memory leak in bpf_get_ksyms(): it allocates a struct
ksyms internally and never frees it.
Move struct ksyms to trace_helpers.h and return it from the
bpf_get_ksyms(), giving ownership to the caller. Add filtered_syms and
filtered_cnt fields to the ksyms to hold the filtered array of
symbols, previously returned by bpf_get_ksyms().
Fixup the call sites: kprobe_multi_test and bench_trigger.
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20260223190736.649171-10-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
