linux-stable/tools/bpf/bpftool
Larysa Zaremba 418fbe8257 bpftool: Use sysfs vmlinux when dumping BTF by ID
Currently, dumping almost all BTFs specified by id requires
using the -B option to pass the base BTF. For kernel module
BTFs the vmlinux BTF sysfs path should work.

This patch simplifies dumping by ID usage by loading
vmlinux BTF from sysfs as base, if base BTF was not specified
and the ID corresponds to a kernel module BTF.

Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Link: https://lore.kernel.org/bpf/20220513121743.12411-1-larysa.zaremba@intel.com
2022-05-13 16:07:53 -07:00
..
Documentation bpftool: Add support for subskeletons 2022-03-17 23:12:39 -07:00
bash-completion bpftool: Add support for subskeletons 2022-03-17 23:12:39 -07:00
skeleton bpftool: Add bpf_cookie to link output 2022-03-15 15:07:27 -07:00
.gitignore bpftool: Fix SPDX tag for Makefiles and .gitignore 2021-11-10 09:00:52 -08:00
Makefile Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
btf.c bpftool: Use sysfs vmlinux when dumping BTF by ID 2022-05-13 16:07:53 -07:00
btf_dumper.c bpftool: Use bpf_obj_get_info_by_fd directly 2021-11-03 11:25:32 -07:00
cfg.c tools, bpftool: Poison and replace kernel integer typedefs 2020-05-11 21:20:46 +02:00
cfg.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00
cgroup.c bpftool: Adding support for BTF program names 2022-01-19 10:04:41 -08:00
common.c bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK 2022-04-10 20:17:16 -07:00
feature.c bpftool: Output message if no helpers found in feature probing 2022-05-09 17:16:05 -07:00
gen.c bpftool: bpf_link_get_from_fd support for LSM programs in lskel 2022-05-10 10:42:08 -07:00
iter.c bpftool: Use libbpf_get_error() to check error 2021-11-14 18:38:13 -08:00
jit_disasm.c bpftool: Properly close va_list 'ap' by va_end() on error 2021-07-06 09:19:23 +02:00
json_writer.c bpftool: Support dumping metadata 2020-09-15 18:28:27 -07:00
json_writer.h bpftool: Support dumping metadata 2020-09-15 18:28:27 -07:00
link.c bpf, x86: Generate trampolines from bpf_tramp_links 2022-05-10 17:50:40 -07:00
main.c bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK 2022-04-10 20:17:16 -07:00
main.h bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK 2022-04-10 20:17:16 -07:00
map.c bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK 2022-04-10 20:17:16 -07:00
map_perf_ring.c bpftool: Update btf_dump__new() and perf_buffer__new_raw() calls 2021-11-11 16:54:06 -08:00
net.c bpftool: use new API for attaching XDP program 2022-01-20 21:22:02 -08:00
netlink_dumper.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
netlink_dumper.h tools: bpftool: dual license all files 2018-12-13 12:08:44 +01:00
perf.c bpftool, musl compat: Replace nftw with FTW_ACTIONRETVAL 2022-04-25 23:24:16 +02:00
pids.c bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK 2022-04-10 20:17:16 -07:00
prog.c bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK 2022-04-10 20:17:16 -07:00
struct_ops.c bpftool: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK 2022-04-10 20:17:16 -07:00
tracelog.c bpftool, musl compat: Replace sys/fcntl.h by fcntl.h 2022-04-25 23:24:28 +02:00
xlated_dumper.c bpftool: Remove usage of reallocarray() 2022-02-23 13:55:01 -08:00
xlated_dumper.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00