All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 00/16] Misc BPF gotox fixes
@ 2026-09-25 17:52 Daniel Borkmann
  2026-09-25 17:52 ` [PATCH bpf-next v3 01/16] bpf: Avoid quadratic successor rescan in bpf_compute_scc Daniel Borkmann
                   ` (16 more replies)
  0 siblings, 17 replies; 20+ messages in thread
From: Daniel Borkmann @ 2026-09-25 17:52 UTC (permalink / raw)
  To: alexei.starovoitov; +Cc: eddyz87, john.fastabend, memxor, bpf

Address various open issues around gotox instruction, see individual
commits for details. Also BPF selftests are added to assert that these
are addressed.

v2 -> v3:
  - Rebased onto bpf-next given indirect call series landed
  - Split out the exit_idx sentinel as its own fix (Eduard)
  - Return early from visit_gotox_insn() on a revisited gotox (Eduard)
  - Check both ends of the target slice in check_indirect_jump() (Eduard)
  - Rewrite edge limit and nop target tests in inline asm (Eduard)
  - Name the patch modes BPF_PATCH_{KEEP,MOVE}_TARGET (Eduard)
  - Drop the insn array stale reuse test (Eduard)
  - Clear the insn array used flag with release semantics (sashiko)
  - Add fix for the exception callback index after dead subprog removal
  - Free the jump tables of removed subprogs and on a failed table build
  - Shift the poke descriptors along with the insn array slots
v1 -> v2:
  - Remove jt_spans_subprogs and reject right away (Eduard)
  - Rework jump table to no longer keep it in insn_aux_data (Eduard)
  - Fix up comments in bpf_compute_scc (Eduard)
  - Fix up commit message nit wrt signed_loader (Anton)
  - Added 3 more fixes related to gotox along with BPF selftests

Daniel Borkmann (16):
  bpf: Avoid quadratic successor rescan in bpf_compute_scc
  bpf: Bound the number of indirect jump edges in a program
  bpf: Rebase the exception callback subprog when dead subprogs are removed
  bpf: Leave out the hidden exit edge of a subprogram without an exit
  bpf: Cache the jump table of a subprogram during CFG discovery
  bpf: Reject indirect jumps that leave their subprogram
  bpf: Don't remove indirect jump targets in the nop removal pass
  bpf: Clear insn array jitted pointers on map reuse
  bpf: Clear the insn array used flag with release semantics
  bpf: Retarget indirect jump targets across prologue prepends
  selftests/bpf: Add tests for the indirect jump edge limit
  selftests/bpf: Add a test for a tail call in a subprogram without an exit
  selftests/bpf: Add tests for indirect jumps across subprograms
  selftests/bpf: Add a test for gotox nop targets
  selftests/bpf: Add tests for gotox targets across prologue prepends
  selftests/bpf: Add a test for an exception callback behind a dead subprog

 include/linux/bpf.h                           |   2 +-
 include/linux/bpf_verifier.h                  |  12 +-
 kernel/bpf/bpf_insn_array.c                   |  19 +-
 kernel/bpf/cfg.c                              | 241 ++++---
 kernel/bpf/fixups.c                           |  92 ++-
 kernel/bpf/liveness.c                         |  26 +-
 kernel/bpf/verifier.c                         |  37 +-
 .../selftests/bpf/prog_tests/bpf_insn_array.c | 650 +++++++++++++++++-
 .../selftests/bpf/prog_tests/exceptions.c     |   7 +
 .../bpf/progs/exceptions_dead_subprog.c       |  40 ++
 .../selftests/bpf/progs/verifier_cfg.c        |  38 +
 .../selftests/bpf/progs/verifier_gotox.c      | 125 +++-
 12 files changed, 1115 insertions(+), 174 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/exceptions_dead_subprog.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-09-25 21:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-25 17:52 [PATCH bpf-next v3 00/16] Misc BPF gotox fixes Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 01/16] bpf: Avoid quadratic successor rescan in bpf_compute_scc Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 02/16] bpf: Bound the number of indirect jump edges in a program Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 03/16] bpf: Rebase the exception callback subprog when dead subprogs are removed Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 04/16] bpf: Leave out the hidden exit edge of a subprogram without an exit Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 05/16] bpf: Cache the jump table of a subprogram during CFG discovery Daniel Borkmann
2026-09-25 21:01   ` Alexei Starovoitov
2026-09-25 17:52 ` [PATCH bpf-next v3 06/16] bpf: Reject indirect jumps that leave their subprogram Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 07/16] bpf: Don't remove indirect jump targets in the nop removal pass Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 08/16] bpf: Clear insn array jitted pointers on map reuse Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 09/16] bpf: Clear the insn array used flag with release semantics Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 10/16] bpf: Retarget indirect jump targets across prologue prepends Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 11/16] selftests/bpf: Add tests for the indirect jump edge limit Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 12/16] selftests/bpf: Add a test for a tail call in a subprogram without an exit Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 13/16] selftests/bpf: Add tests for indirect jumps across subprograms Daniel Borkmann
2026-09-25 18:45   ` bot+bpf-ci
2026-09-25 17:52 ` [PATCH bpf-next v3 14/16] selftests/bpf: Add a test for gotox nop targets Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 15/16] selftests/bpf: Add tests for gotox targets across prologue prepends Daniel Borkmann
2026-09-25 17:52 ` [PATCH bpf-next v3 16/16] selftests/bpf: Add a test for an exception callback behind a dead subprog Daniel Borkmann
2026-09-25 21:10 ` [PATCH bpf-next v3 00/16] Misc BPF gotox fixes patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.