Skip to content

bpf, fix for subprogs with tailcalls

John Fastabend bpf netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 1 replySuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: track subprog poke correctly, fix use-after-freearch/x86/net/bpf_jit_comp.c include/linux/bpf.h kernel/bpf/core.c +1 more+19 -380 replies
2/2bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn patchtools/testing/selftests/bpf/prog_tests/tailcalls.c tools/testing/selftests/bpf/progs/tailcall_bpf2bpf4.c+46 -112 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 v2 0/2] bpf, fix for subprogs with tailcalls

This fixes a use-after-free when using subprogs and tailcalls and adds a test case to trigger the use-after-free.

v2: original patch missed fixups needed in out label as Daniel caught

John Fastabend (2):
bpf: track subprog poke correctly, fix use-after-free
bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn
patch

 arch/x86/net/bpf_jit_comp.c                   |  4 ++
 include/linux/bpf.h                           |  1 +
 kernel/bpf/core.c                             |  7 ++-
 kernel/bpf/verifier.c                         | 45 ++++---------------
 .../selftests/bpf/prog_tests/tailcalls.c      | 36 ++++++++++-----
 .../selftests/bpf/progs/tailcall_bpf2bpf4.c   | 21 ++++++++-
 6 files changed, 65 insertions(+), 49 deletions(-)
Signature · 1 line
2.17.1