Skip to content

bpf: Allow access to const void pointer arguments in tracing programs

KaFai Wan bpf linux-kselftest lkml netdev 4 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. v4 Latest2 patches 1 replyApplied 2/2
  2. v32 patches 2 repliesSuperseded
  3. v22 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches4 repliesSuperseded

Changelog from the cover letter

v3->v4: Addressed comments from Alexei Starovoitov
- change SOB to match From email address
- add Acked-by from jirka
Details in here:
https://lore.kernel.org/all/[email protected]/

Patches in v4 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: Allow access to const void pointer arguments in tracing programskernel/bpf/btf.c+3 -101 replyApplied
2/2selftests/bpf: Add test to access const void pointer argument in tracing programnet/bpf/test_run.c tools/testing/selftests/bpf/progs/verifier_btf_ctx_access.c+19 -10 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJiri Olsa
1/2A-b
2/2A-b

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

Read the v4 thread

Cover letter [PATCH bpf-next v4 0/2] bpf: Allow access to const void pointer arguments in tracing programs

If we try to access argument which is pointer to const void, it's an UNKNOWN type, verifier will fail to load.

Use is_void_or_int_ptr to check if type is void or int pointer. Add a selftest to check it.

---
KaFai Wan (2):
bpf: Allow access to const void pointer arguments in tracing programs selftests/bpf: Add test to access const void pointer argument in
tracing program

 kernel/bpf/btf.c                                    | 13 +++----------
 net/bpf/test_run.c                                  |  8 +++++++-
 .../selftests/bpf/progs/verifier_btf_ctx_access.c   | 12 ++++++++++++
 3 files changed, 22 insertions(+), 11 deletions(-)

Changelog:
v3->v4: Addressed comments from Alexei Starovoitov
- change SOB to match From email address
- add Acked-by from jirka
Details in here:
https://lore.kernel.org/all/[email protected]/

v2->v3: Addressed comments from jirka
- remove duplicate checks for void pointer
Details in here:
https://lore.kernel.org/bpf/[email protected]/

v1->v2: Addressed comments from jirka
- use btf_type_is_void to check if type is void
- merge is_void_ptr and is_int_ptr to is_void_or_int_ptr
- fix selftests
Details in here:
https://lore.kernel.org/all/[email protected]/

Signature · 1 line
2.43.0