Skip to content

Add resolve_btfids support for __arena kfunc suffix

Kumar Kartikeya Dwivedi bpf 2 versions – Applied

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

  1. v2 Latest2 patches 1 replyApplied 2/2
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

v1: https://lore.kernel.org/bpf/[email protected]

* Avoid enumerating all the ways resolve_btfids can emit the "address_space(1)" attribute in its header comment and in kfuncs.rst. (Ihor)
* Drop the kfunc_has_arena_arg() helper: add_arena_tagged_proto() returns the original prototype when nothing needs tagging, so it can be invoked unconditionally for every kfunc. (Ihor)
* Add resolve_btfids selftest cases with mixed tagged and untagged arguments, and a kfunc that combines the KF_ARENA_RET flag with suffixed arena arguments. (Ihor)

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2resolve_btfids: Emit arena attributes from kfunc parameter suffixesDocumentation/bpf/kfuncs.rst tools/bpf/resolve_btfids/main.c+54 -220 repliesApplied
2/2selftests/bpf: Test resolve_btfids arena argument suffixestools/testing/selftests/bpf/prog_tests/resolve_btfids.c tools/testing/selftests/bpf/progs/btf_data.c+45 -160 repliesApplied

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchIhor Solodrai
SeriesA-b
1/2
2/2

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

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/2] Add resolve_btfids support for __arena kfunc suffix

Use __arena/__arena__nullable suffixes to emit address_space(1) annotations on kfunc definitions in vmlinux.h. See commits for details.

Changelog:
----------
v1 -> v2
v1: https://lore.kernel.org/bpf/[email protected]

* Avoid enumerating all the ways resolve_btfids can emit the "address_space(1)" attribute in its header comment and in kfuncs.rst. (Ihor)
* Drop the kfunc_has_arena_arg() helper: add_arena_tagged_proto() returns the original prototype when nothing needs tagging, so it can be invoked unconditionally for every kfunc. (Ihor)
* Add resolve_btfids selftest cases with mixed tagged and untagged arguments, and a kfunc that combines the KF_ARENA_RET flag with suffixed arena arguments. (Ihor)

Kumar Kartikeya Dwivedi (2):
resolve_btfids: Emit arena attributes from kfunc parameter suffixes selftests/bpf: Test resolve_btfids arena argument suffixes

 Documentation/bpf/kfuncs.rst                  |  4 +-
 tools/bpf/resolve_btfids/main.c               | 72 +++++++++++++------
 .../selftests/bpf/prog_tests/resolve_btfids.c | 41 ++++++-----
 tools/testing/selftests/bpf/progs/btf_data.c  | 20 ++++++
 4 files changed, 99 insertions(+), 38 deletions(-)

base-commit: 3a59f11e0f989bdd637c87151992605a6559a7cb

Signature · 1 line
2.53.0