summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2026-10-02 12:47:09 +0000
committerKumar Kartikeya Dwivedi <memxor@gmail.com>2026-10-03 16:08:19 +0200
commit124a5a2bc0e28989aa007acf6543c826143cbf65 (patch)
tree9d0ce7d7f9a49aaf02ca702a4663135c8eceedf4 /include/linux
parent9094a158e842323b4487e32e88f01bd45a16af66 (diff)
downloadlinux-next-124a5a2bc0e28989aa007acf6543c826143cbf65.tar.gz
linux-next-124a5a2bc0e28989aa007acf6543c826143cbf65.zip
bpftool: Skip pieces of variables in DATASEC
The kernel accepts a variable in DATASEC that is smaller than its type. It's a piece of a variable that the compiler split, with the type of the whole variable. bpftool prints a variable by its type, so it reads past the piece and, when the piece is the last in the section, past the buffer with the value of the map: $ bpftool map dump pinned /sys/fs/bpf/piece ".bss": [{ "whole": 67305985 },{ "piece.0": { "a": [134678021,1994496712,32592,32,0,833,0,414764080 Only the first number is in the map. Skip the pieces in btf_dumper_datasec(), like btf_datasec_show() in the kernel does, and in show_prog_metadata(). Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20261002124714.180012-11-alexei.starovoitov@gmail.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions