Skip to content

btf: support ints larger than 128 bits

Sean Young bpf linux-doc lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 5 repliesIn review
  2. v21 patch 2 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v3 from the cover letter

- split patches into 4 distinct patches

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4btf: add support for ints larger than 128 bitsDocumentation/bpf/btf.rst include/uapi/linux/btf.h kernel/bpf/btf.c +1 more+49 -132 replies
2/4libbpf: add support for ints larger than 128 bitstools/lib/bpf/btf.c+1 -10 replies
3/4bpftool: add support for ints larger than 128 bitstools/bpf/bpftool/btf_dumper.c+40 -01 reply
4/4bpf: add tests for ints larger than 128 bitstools/testing/selftests/bpf/Makefile tools/testing/selftests/bpf/prog_tests/btf.c tools/testing/selftests/bpf/progs/test_btf_extint.c +1 more+589 -21 reply

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/4] btf: support ints larger than 128 bits

clang supports arbitrary length ints using the _ExtInt extension. This can be useful to hold very large values, e.g. 256 bit or 512 bit types.

Larger types (e.g. 1024 bits) are possible but I am unaware of a use case for these.

This requires the _ExtInt extension enabled in clang, which is under review.

changes since v2:
- split patches into 4 distinct patches

changes since v1:
- added tests as suggested by Yonghong Song
- added kernel pretty-printer

Sean Young (4):
btf: add support for ints larger than 128 bits
libbpf: add support for ints larger than 128 bits
bpftool: add support for ints larger than 128 bits
bpf: add tests for ints larger than 128 bits

 Documentation/bpf/btf.rst                     |   4 +-
 include/uapi/linux/btf.h                      |   2 +-
 kernel/bpf/btf.c                              |  54 +-
 tools/bpf/bpftool/btf_dumper.c                |  40 ++
 tools/include/uapi/linux/btf.h                |   2 +-
 tools/lib/bpf/btf.c                           |   2 +-
 tools/testing/selftests/bpf/Makefile          |   3 +-
 tools/testing/selftests/bpf/prog_tests/btf.c  |   3 +-
 .../selftests/bpf/progs/test_btf_extint.c     |  50 ++
 tools/testing/selftests/bpf/test_extint.py    | 535 ++++++++++++++++++
 10 files changed, 679 insertions(+), 16 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_btf_extint.c
 create mode 100755 tools/testing/selftests/bpf/test_extint.py
Signature · 1 line
2.29.2