BTF-to-C dumper fixes and improvements
Status from this message: This series was applied to bpf/bpf-next.git (master)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 2 repliesApplied 6/6
- v16 patches 6 repliesSuperseded
Changes in v2 from the cover letter
- fix bug in natural alignment detection (Eduard).
Patches in v2 All 6 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | libbpf: fix single-line struct definition output in btf_dumptools/ | +5 | 0 replies | Applied |
| 2/6 | libbpf: handle non-standardly sized enums better in BTF-to-C dumpertools/ | +38 | 0 replies | Applied |
| 3/6 | selftests/bpf: add non-standardly sized enum tests for btf_dumptools/ | +36 | 0 replies | Applied |
| 4/6 | libbpf: fix btf__align_of() by taking into account field offsetstools/ | +13 | 0 replies | Applied |
| 5/6 | libbpf: fix BTF-to-C converter's padding logictools/ tools/ tools/ | +164 | 2 replies | Applied |
| 6/6 | selftests/bpf: add few corner cases to test padding handling of btf_dumptools/ tools/ | +164 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 bpf-next 0/6] BTF-to-C dumper fixes and improvements
Fix few tricky issues in libbpf's BTF-to-C converter, discovered thanks to Per's reports and his randomized testing script.
Most notably there is a much improved and correct padding handling. But also it turned out that some corner cases with enums weren't handled correctly (mode(byte) attribute was a new discovery for me). See respective patches for more details.
v1->v2:
- fix bug in natural alignment detection (Eduard).
Andrii Nakryiko (6):
libbpf: fix single-line struct definition output in btf_dump
libbpf: handle non-standardly sized enums better in BTF-to-C dumper selftests/bpf: add non-standardly sized enum tests for btf_dump
libbpf: fix btf__align_of() by taking into account field offsets
libbpf: fix BTF-to-C converter's padding logic selftests/bpf: add few corner cases to test padding handling of
btf_dump
tools/lib/bpf/btf.c | 13 ++ tools/lib/bpf/btf_dump.c | 214 ++++++++++++++---- .../bpf/progs/btf_dump_test_case_bitfields.c | 2 +- .../bpf/progs/btf_dump_test_case_packing.c | 61 ++++- .../bpf/progs/btf_dump_test_case_padding.c | 162 +++++++++++-- .../bpf/progs/btf_dump_test_case_syntax.c | 36 +++ 6 files changed, 420 insertions(+), 68 deletions(-)
Signature · 1 line
2.30.2