Skip to content

Add array support to btf_struct_access

Martin KaFai Lau bpf netdev 4 versions – Applied

Status from this message: Applied. Thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 1 replyApplied
  2. v33 patches 7 repliesSuperseded
  3. v22 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches0 repliesSuperseded

Changes in v4 from the cover letter

- Avoid removing a useful comment from btf_struct_access()
- Add comments to clarify the "mtrue_end" naming and how it may not always correspond to mtype/msize/moff.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/2bpf: Add array support to btf_struct_accesskernel/bpf/btf.c+166 -290 replies
2/2bpf: Add cb access in kfree_skb testtools/testing/selftests/bpf/prog_tests/kfree_skb.c tools/testing/selftests/bpf/progs/kfree_skb.c+63 -160 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH v4 bpf-next 0/2] Add array support to btf_struct_access

This series adds array support to btf_struct_access(). Please see individual patch for details.

v4:
- Avoid removing a useful comment from btf_struct_access()
- Add comments to clarify the "mtrue_end" naming and how it may not always correspond to mtype/msize/moff.

v3:
- Fixed an interpreter issue that missed accounting for insn->off

v2:
- Fix a divide-by-zero when there is empty array in a struct (e.g. "__u8 __cloned_offset[0];" in skbuff)
- Add 'static' to a global var in prog_tests/kfree_skb.c

Martin KaFai Lau (2):
bpf: Add array support to btf_struct_access
bpf: Add cb access in kfree_skb test

 kernel/bpf/btf.c                              | 195 +++++++++++++++---
 .../selftests/bpf/prog_tests/kfree_skb.c      |  54 ++++-
 tools/testing/selftests/bpf/progs/kfree_skb.c |  25 ++-
 3 files changed, 229 insertions(+), 45 deletions(-)
Signature · 1 line
2.17.1