All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf  0/2] bpf fix for mixed tail calls and subprograms
@ 2021-06-08 19:29 John Fastabend
  2021-06-08 19:30 ` [PATCH bpf 1/2] bpf: Fix null ptr deref with mixed tail calls and subprogs John Fastabend
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: John Fastabend @ 2021-06-08 19:29 UTC (permalink / raw)
  To: ast, daniel, andriin; +Cc: john.fastabend, netdev, bpf, maciej.fijalkowski

We recently tried to use mixed programs that have both tail calls and
subprograms, but it needs the attached fix. Also added a small test
addition that will cause the failure without the fix.

Thanks,
John

---

John Fastabend (2):
      bpf: Fix null ptr deref with mixed tail calls and subprogs
      bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn patch


 .../selftests/bpf/progs/tailcall_bpf2bpf4.c     | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH bpf 0/2] bpf, fix for subprogs with tailcalls
@ 2021-06-30 19:40 John Fastabend
  2021-06-30 19:40 ` [PATCH bpf 2/2] bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn patch John Fastabend
  0 siblings, 1 reply; 14+ messages in thread
From: John Fastabend @ 2021-06-30 19:40 UTC (permalink / raw)
  To: maciej.fijalkowski, ast, daniel, andriin; +Cc: john.fastabend, bpf, netdev

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

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                         | 39 ++++---------------
 .../selftests/bpf/prog_tests/tailcalls.c      | 36 ++++++++++++-----
 .../selftests/bpf/progs/tailcall_bpf2bpf4.c   | 21 +++++++++-
 6 files changed, 64 insertions(+), 44 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-06-30 19:41 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 19:29 [PATCH bpf 0/2] bpf fix for mixed tail calls and subprograms John Fastabend
2021-06-08 19:30 ` [PATCH bpf 1/2] bpf: Fix null ptr deref with mixed tail calls and subprogs John Fastabend
2021-06-09  6:21   ` Yonghong Song
2021-06-09 15:51   ` Maciej Fijalkowski
2021-06-09 16:23     ` John Fastabend
2021-06-08 19:30 ` [PATCH bpf 2/2] bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn patch John Fastabend
2021-06-09  6:22   ` Yonghong Song
2021-06-09 15:57   ` Maciej Fijalkowski
2021-06-09 16:26     ` John Fastabend
2021-06-09 16:21       ` Maciej Fijalkowski
2021-06-09  6:24 ` [PATCH bpf 0/2] bpf fix for mixed tail calls and subprograms Yonghong Song
2021-06-09 16:17   ` John Fastabend
2021-06-10  0:13     ` Yonghong Song
2021-06-30 19:40 [PATCH bpf 0/2] bpf, fix for subprogs with tailcalls John Fastabend
2021-06-30 19:40 ` [PATCH bpf 2/2] bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn patch John Fastabend

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.