Skip to content

Fix unique field logic in BTF

Kumar Kartikeya Dwivedi bpf sashiko-reviews 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 2 repliesIn review
  2. v11 patch 1 replySuperseded

Changes in v2 from the cover letter

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

* Add fix for BPF_REFCOUNT not being unique. (Sashiko)
* Roll improper offset warning check into series. (Sashiko)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5bpf: Fix offset warn check for bpf_res_spin_lockkernel/bpf/btf.c+1 -11 reply
2/5bpf: Preserve unique-field state across nested structskernel/bpf/btf.c+14 -121 reply
3/5bpf: Mark bpf_refcount field as uniquekernel/bpf/btf.c+1 -10 replies
4/5selftests/bpf: Test duplicate unique fields in nested structstools/testing/selftests/bpf/prog_tests/btf.c+27 -00 replies
5/5selftests/bpf: Test duplicate bpf_refcount fieldstools/testing/selftests/bpf/prog_tests/btf.c+21 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/5] Fix unique field logic in BTF

Fix constraint of certain fields that have to be unique when nested structs are present, BPF_REFCOUNT which should be marked as unique. See commit logs for details. While at it, fix improper offset check.

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

* Add fix for BPF_REFCOUNT not being unique. (Sashiko)
* Roll improper offset warning check into series. (Sashiko)

Kumar Kartikeya Dwivedi (5):
bpf: Fix offset warn check for bpf_res_spin_lock
bpf: Preserve unique-field state across nested structs
bpf: Mark bpf_refcount field as unique selftests/bpf: Test duplicate unique fields in nested structs selftests/bpf: Test duplicate bpf_refcount fields

 kernel/bpf/btf.c                             | 30 ++++++------
 tools/testing/selftests/bpf/prog_tests/btf.c | 48 ++++++++++++++++++++
 2 files changed, 64 insertions(+), 14 deletions(-)

base-commit: ecf11bc5f56abb3a2219a8c75e8a5b54467d1781

Signature · 1 line
2.53.0