s390/bpf: Fix unwinding past the trampoline
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 10 Oct 2023 20:20:10 +0000 (22:20 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 10 Oct 2023 22:08:46 +0000 (00:08 +0200)
commit5356ba1ff4f2417e1aebcf99aab35c1ea94dd6d7
tree902c32326dc6f7fa49763162a007280834b422ab
parentce10fc0604bc6a0d626ed8e5d69088057edc71ab
s390/bpf: Fix unwinding past the trampoline

When functions called by the trampoline panic, the backtrace that is
printed stops at the trampoline, because the trampoline does not store
its caller's frame address (backchain) on stack; it also stores the
return address at a wrong location.

Store both the same way as is already done for the regular eBPF programs.

Fixes: 528eb2cb87bc ("s390/bpf: Implement arch_prepare_bpf_trampoline()")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20231010203512.385819-3-iii@linux.ibm.com
arch/s390/net/bpf_jit_comp.c