Skip to content

bpf: add support for BTF_KIND_DECL_TAG typedef

Yonghong Song bpf 1 version Applied

Status from this message: Applied. Thanks

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5bpf: add BTF_KIND_DECL_TAG typedef supportkernel/bpf/btf.c+2 -20 replies
2/5selftests/bpf: add BTF_KIND_DECL_TAG typedef unit teststools/testing/selftests/bpf/prog_tests/btf.c+36 -00 replies
3/5selftests/bpf: test deduplication for BTF_KIND_DECL_TAG typedeftools/testing/selftests/bpf/prog_tests/btf.c+41 -60 replies
4/5selftests/bpf: add BTF_KIND_DECL_TAG typedef example in tag.ctools/testing/selftests/bpf/progs/tag.c+7 -20 replies
5/5docs/bpf: update documentation for BTF_KIND_DECL_TAG typedef supportDocumentation/bpf/btf.rst+3 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/5] bpf: add support for BTF_KIND_DECL_TAG typedef

Latest upstream llvm-project added support for btf_decl_tag attributes for typedef declarations ([1], [2]). Similar to other btf_decl_tag cases, func/func_param/global_var/struct/union/field, btf_decl_tag with typedef declaration can carry information from kernel source to clang compiler and then to dwarf/BTF, for bpf verification or other use cases.

This patch set added kernel support for BTF_KIND_DECL_TAG to typedef declaration (Patch 1). Additional selftests are added to cover unit testing, dedup, or bpf program usage of btf_decl_tag with typedef. (Patches 2, 3 and 4). The btf documentation is updated to include BTF_KIND_DECL_TAG typedef (Patch 5).

[1] https://reviews.llvm.org/D110127
[2] https://reviews.llvm.org/D112259

Yonghong Song (5):
bpf: add BTF_KIND_DECL_TAG typedef support
selftests/bpf: add BTF_KIND_DECL_TAG typedef unit tests selftests/bpf: test deduplication for BTF_KIND_DECL_TAG typedef selftests/bpf: add BTF_KIND_DECL_TAG typedef example in tag.c docs/bpf: update documentation for BTF_KIND_DECL_TAG typedef support

 Documentation/bpf/btf.rst                    |  6 +-
 kernel/bpf/btf.c                             |  4 +-
 tools/testing/selftests/bpf/prog_tests/btf.c | 83 ++++++++++++++++++--
 tools/testing/selftests/bpf/progs/tag.c      |  9 ++-
 4 files changed, 89 insertions(+), 13 deletions(-)
Signature · 1 line
2.30.2