Skip to content

bpf: fix bpffs/bpftool bitfield value printing

Yonghong Song netdev 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3bpf: fix bpffs bitfield pretty printkernel/bpf/btf.c+6 -60 replies
2/3tools/bpf: test btf bitfield with >=256 struct member offsettools/testing/selftests/bpf/test_btf.c+21 -80 replies
3/3tools/bpf: fix bpftool map dump with bitfieldstools/bpf/bpftool/btf_dumper.c+7 -60 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMartin KaFai Lau
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf 0/3] bpf: fix bpffs/bpftool bitfield value printing

The previous BTF kind_flag support patch set introduced a bug for kernel bpffs pretty printing and another bug for bpftool map pretty printing. If a bitfield struct member offset is greater than 256 bits, printed value for that struct member will be incorrect.

Patch #1 fixed the bug in kernel bpffs pretty printing. Patch #2 enhanced the test_btf test case to cover the issue exposed by patch #1.
Patch #3 fixed the bug in bpftool map pretty printing.

Yonghong Song (3):
bpf: fix bpffs bitfield pretty print
tools/bpf: test btf bitfield with >=256 struct member offset tools/bpf: fix bpftool map dump with bitfields

 kernel/bpf/btf.c                       | 12 +++++------
 tools/bpf/bpftool/btf_dumper.c         | 13 ++++++------
 tools/testing/selftests/bpf/test_btf.c | 29 +++++++++++++++++++-------
 3 files changed, 34 insertions(+), 20 deletions(-)
Signature · 1 line
2.17.1