Skip to content

Improve .BTF_ids patching and alignment

Tony Ambardar bpf linux-kselftest 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tools/resolve_btfids: Simplify handling cross-endian compilationtools/bpf/resolve_btfids/main.c+22 -383 replies
2/3bpf: btf: Ensure natural alignment of .BTF_ids sectioninclude/linux/btf_ids.h+1 -03 replies
3/3tools/bpf, selftests/bpf : Sync btf_ids.h to toolstools/include/linux/btf_ids.h tools/testing/selftests/bpf/prog_tests/resolve_btfids.c+74 -120 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchEduard ZingermanJiri OlsaViktor Malik
1/3A-b A-b A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH bpf-next v1 0/3] Improve .BTF_ids patching and alignment

Hello all,

This patch series offers improvements to the way .BTF_ids section data is created and later patched by resolve_btfids.

Patch #1 simplifies the byte-order translation in resolve_btfids while making it more resilient to future .BTF_ids encoding updates.

Patch #2 makes sure all BTF ID data is 4-byte aligned, and not only the .BTF_ids used for vmlinux.

Patch #3 syncs the above changes in btf_ids.h to tools/include, obviating a previous alignment fix in selftests/bpf.

Feedback and suggestions are welcome!

Best regards,
Tony

Tony Ambardar (3):
tools/resolve_btfids: Simplify handling cross-endian compilation
bpf: btf: Ensure natural alignment of .BTF_ids section tools/bpf, selftests/bpf : Sync btf_ids.h to tools

 include/linux/btf_ids.h                       |  1 +
 tools/bpf/resolve_btfids/main.c               | 60 +++++---------
 tools/include/linux/btf_ids.h                 | 80 +++++++++++++++++--
 .../selftests/bpf/prog_tests/resolve_btfids.c |  6 --
 4 files changed, 97 insertions(+), 50 deletions(-)
Signature · 1 line
2.34.1