linux/tools/bpf/bpftool
Jakub Kicinski a49d6df148 bpftool: Fix truncated netlink dumps
[ Upstream commit 3b39d73cc3 ]

Netlink requires that the recv buffer used during dumps is at least
min(PAGE_SIZE, 8k) (see the man page). Otherwise the messages will
get truncated. Make sure bpftool follows this requirement, avoid
missing information on systems with large pages.

Acked-by: Quentin Monnet <qmo@kernel.org>
Fixes: 7084566a23 ("tools/bpftool: Remove libbpf_internal.h usage in bpftool")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20260217194150.734701-1-kuba@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:19:52 -05:00
..
bash-completion tools: bpftool: Complete metrics list in "bpftool prog profile" doc 2021-07-30 15:40:28 -07:00
Documentation bpftool: Fix indent in option lists in the documentation 2022-01-27 11:05:26 +01:00
skeleton bpftool: Use a local bpf_perf_event_value to fix accessing its fields 2023-09-19 12:22:32 +02:00
.gitignore tools/bpf: Remove bpf-helpers from bpftool docs 2021-03-04 18:39:45 -08:00
btf.c tools: bpftool: Document and add bash completion for -L, -B options 2021-07-30 15:40:28 -07:00
btf_dumper.c bpftool: Fix a wrong type cast in btf_dumper_int 2022-10-26 12:34:39 +02: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 tools: bpftool: Document and add bash completion for -L, -B options 2021-07-30 15:40:28 -07:00
common.c bpftool: Fix readlink usage in get_fd_type 2025-06-04 14:38:04 +02:00
feature.c bpftool: JIT limited misreported as negative value on aarch64 2023-07-23 13:46:50 +02:00
gen.c bpftool: Only set obj->skeleton on complete success 2022-04-08 14:23:24 +02:00
iter.c tools: bpftool: Update and synchronise option list in doc and help msg 2021-07-30 15:40:27 -07:00
jit_disasm.c bpftool: Remove asserts from JIT disassembler 2024-12-14 19:51:29 +01:00
json_writer.c tools: bpftool: Remove invalid \' json escape 2023-05-11 23:00:25 +09:00
json_writer.h bpftool: Support dumping metadata 2020-09-15 18:28:27 -07:00
link.c tools: bpftool: Update and synchronise option list in doc and help msg 2021-07-30 15:40:27 -07:00
main.c bpftool: Clear errno after libcap's checks 2022-10-26 12:35:32 +02:00
main.h bpftool: Remove asserts from JIT disassembler 2024-12-14 19:51:29 +01:00
Makefile tools bpftool: Fix compilation error with new binutils 2023-03-17 08:49:04 +01:00
map.c bpftool: Remove asserts from JIT disassembler 2024-12-14 19:51:29 +01:00
map_perf_ring.c tools, bpftool: Poison and replace kernel integer typedefs 2020-05-11 21:20:46 +02:00
net.c bpftool: Fix truncated netlink dumps 2026-03-04 07:19:52 -05: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 tools: bpftool: Update and synchronise option list in doc and help msg 2021-07-30 15:40:27 -07:00
pids.c tools/bpftool: Fix PID fetching with a lot of results 2020-12-08 16:45:20 +01:00
prog.c bpftool: fix potential NULL pointer dereferencing in prog_dump() 2024-12-14 19:51:29 +01:00
struct_ops.c tools: bpftool: Update and synchronise option list in doc and help msg 2021-07-30 15:40:27 -07:00
tracelog.c tools: bpftool: add an option to prevent auto-mount of bpffs, tracefs 2018-12-18 14:47:17 +01:00
xlated_dumper.c bpftool: Fix bug for long instructions in program CFG dumps 2023-05-11 23:00:27 +09:00
xlated_dumper.h tools: bpftool: replace Netronome boilerplate with SPDX license headers 2018-12-13 12:08:44 +01:00