Skip to content

Fix reference state management for synchronous callbacks

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 Latest3 patches 0 repliesApplied 3/3
  2. v13 patches 3 repliesApplied

Changes in v2 from the cover letter

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

* Fix error for test_progs-no_alu32 due to distinct alloc_insn in errstr

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf: Move bpf_loop and bpf_for_each_map_elem under CAP_BPFkernel/bpf/helpers.c+4 -40 repliesApplied
2/3bpf: Fix reference state management for synchronous callbacksinclude/linux/bpf_verifier.h kernel/bpf/verifier.c+44 -90 repliesApplied
3/3selftests/bpf: Add tests for reference state fixes for callbackstools/testing/selftests/bpf/prog_tests/cb_refs.c tools/testing/selftests/bpf/progs/cb_refs.c+164 -00 repliesApplied

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH bpf v2 0/3] Fix reference state management for synchronous callbacks

This is patch 1, 2 + their individual tests split into a separate series from the RFC, so that these can be taken in, while we continue working towards a fix for handling stack access inside the callback.

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

* Fix error for test_progs-no_alu32 due to distinct alloc_insn in errstr

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

* Fix up commit log to add more explanation (Alexei)
* Split reference state fix out into a separate series

Kumar Kartikeya Dwivedi (3):
bpf: Move bpf_loop and bpf_for_each_map_elem under CAP_BPF
bpf: Fix reference state management for synchronous callbacks selftests/bpf: Add tests for reference state fixes for callbacks

 include/linux/bpf_verifier.h                  |  11 ++
 kernel/bpf/helpers.c                          |   8 +-
 kernel/bpf/verifier.c                         |  42 +++++--
 .../selftests/bpf/prog_tests/cb_refs.c        |  48 ++++++++
 tools/testing/selftests/bpf/progs/cb_refs.c   | 116 ++++++++++++++++++
 5 files changed, 212 insertions(+), 13 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/cb_refs.c
 create mode 100644 tools/testing/selftests/bpf/progs/cb_refs.c
Signature · 1 line
2.34.1