bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] s390/bpf: Remove the orig_call NULL check
@ 2025-05-12 20:57 Ilya Leoshkevich
  2025-05-12 20:57 ` [PATCH bpf-next 1/2] bpf: Pass the same orig_call value to trampoline functions Ilya Leoshkevich
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ilya Leoshkevich @ 2025-05-12 20:57 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
  Cc: bpf, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Ilya Leoshkevich

Hi,

I've been looking at fixing the tailcall_bpf2bpf_hierarchy failures on
s390. One of the challenges is that when a BPF trampoline calls a BPF
prog A, the prologue of A sets the tail call count to 0. Therefore it
would be useful to know whether the trampoline is attached to some
other BPF prog B, in which case A should be called using an offset
equal to tail_call_start, bypassing the tail call count initialization.

The trampoline attachment point is passed to trampoline functions via
the orig_call variable. Unfortunately in the case of calculating the
size of a struct_ops trampoline it's NULL, and I could not think of a
good reason to have it this way. This series makes it always non-NULL.

Best regards,
Ilya

Ilya Leoshkevich (2):
  bpf: Pass the same orig_call value to trampoline functions
  s390/bpf: Remove the orig_call NULL check

 arch/s390/net/bpf_jit_comp.c | 5 ++---
 kernel/bpf/bpf_struct_ops.c  | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

-- 
2.49.0


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

end of thread, other threads:[~2025-05-15  0:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 20:57 [PATCH bpf-next 0/2] s390/bpf: Remove the orig_call NULL check Ilya Leoshkevich
2025-05-12 20:57 ` [PATCH bpf-next 1/2] bpf: Pass the same orig_call value to trampoline functions Ilya Leoshkevich
2025-05-14 21:26   ` Martin KaFai Lau
2025-05-14 22:46     ` Ilya Leoshkevich
2025-05-14 23:30       ` Martin KaFai Lau
2025-05-12 20:57 ` [PATCH bpf-next 2/2] s390/bpf: Remove the orig_call NULL check Ilya Leoshkevich
2025-05-15  1:00 ` [PATCH bpf-next 0/2] " patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).