All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/4] BPF fixes mixed tail and bpf2bpf calls
@ 2021-06-16 22:54 John Fastabend
  2021-06-16 22:55 ` [PATCH bpf v2 1/4] bpf: Fix null ptr deref with mixed tail calls and subprogs John Fastabend
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: John Fastabend @ 2021-06-16 22:54 UTC (permalink / raw)
  To: maciej.fijalkowski, ast, daniel, andriin; +Cc: john.fastabend, netdev, netdev

We recently tried to use mixed programs that have both tail calls and
subprograms, but it needs the attached fixes.

Also added a new test case tailcall_bpf2bpf_5 that simply runs the
previous test case tailcall_bpf2bpf_4 and adds some "noise". The
noise here is just a bunch of map calls to get the verifier to insert
instructions and cause code movement plus it forces used_maps logic
to be used. Originally, I just extended bpf2bpf_4 directly, but if I
got the feedback correct it seems the preference is to have another
test case for this specifically.

With attached patches our programs are happily running with mixed
subprograms and tailcalls.

Thanks,
John

---

John Fastabend (4):
      bpf: Fix null ptr deref with mixed tail calls and subprogs
      bpf: map_poke_descriptor is being called with an unstable poke_tab[]
      bpf: track subprog poke correctly
      bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn patch


 include/linux/bpf.h                           |  1 +
 kernel/bpf/core.c                             |  6 ++--
 kernel/bpf/verifier.c                         | 36 ++++++++++++++-----
 .../selftests/bpf/prog_tests/tailcalls.c      | 36 +++++++++++++------
 .../selftests/bpf/progs/tailcall_bpf2bpf4.c   | 20 ++++++++++-
 5 files changed, 77 insertions(+), 22 deletions(-)

--


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

end of thread, other threads:[~2021-06-22 23:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 22:54 [PATCH bpf v2 0/4] BPF fixes mixed tail and bpf2bpf calls John Fastabend
2021-06-16 22:55 ` [PATCH bpf v2 1/4] bpf: Fix null ptr deref with mixed tail calls and subprogs John Fastabend
2021-06-16 22:55 ` [PATCH bpf v2 2/4] bpf: map_poke_descriptor is being called with an unstable poke_tab[] John Fastabend
2021-06-16 23:42   ` John Fastabend
2021-06-22 21:54   ` Alexei Starovoitov
2021-06-22 22:59     ` John Fastabend
2021-06-16 22:55 ` [PATCH bpf v2 3/4] bpf: track subprog poke correctly John Fastabend
2021-06-22 22:00   ` Alexei Starovoitov
2021-06-22 23:02     ` John Fastabend
2021-06-22 23:07       ` Alexei Starovoitov
2021-06-16 22:55 ` [PATCH bpf v2 4/4] bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn patch John Fastabend
2021-06-17  4:30 ` [PATCH bpf v2 0/4] BPF fixes mixed tail and bpf2bpf calls Andrii Nakryiko

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.