linux/arch/s390
Ilya Leoshkevich 78a327ef0a s390/bpf: Store backchain even for leaf progs
[ Upstream commit 5f55f21684 ]

Currently a crash in a leaf prog (caused by a bug) produces the
following call trace:

     [<000003ff600ebf00>] bpf_prog_6df0139e1fbf2789_fentry+0x20/0x78
     [<0000000000000000>] 0x0

This is because leaf progs do not store backchain. Fix by making all
progs do it. This is what GCC and Clang-generated code does as well.
Now the call trace looks like this:

     [<000003ff600eb0f2>] bpf_prog_6df0139e1fbf2789_fentry+0x2a/0x80
     [<000003ff600ed096>] bpf_trampoline_201863462940+0x96/0xf4
     [<000003ff600e3a40>] bpf_prog_05f379658fdd72f2_classifier_0+0x58/0xc0
     [<000003ffe0aef070>] bpf_test_run+0x210/0x390
     [<000003ffe0af0dc2>] bpf_prog_test_run_skb+0x25a/0x668
     [<000003ffe038a90e>] __sys_bpf+0xa46/0xdb0
     [<000003ffe038ad0c>] __s390x_sys_bpf+0x44/0x50
     [<000003ffe0defea8>] __do_syscall+0x150/0x280
     [<000003ffe0e01d5c>] system_call+0x74/0x98

Fixes: 0546231057 ("s390/bpf: Add s390x eBPF JIT compiler backend")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20250512122717.54878-1-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-06-19 15:31:49 +02:00
..
appldata sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
boot s390/boot: Fix ESSA detection 2025-02-27 04:30:22 -08:00
configs s390: Update defconfigs 2024-10-16 11:32:32 +02:00
crypto crypto: lib/Kconfig - Hide arch options from user 2025-05-02 07:59:32 +02:00
hypfs hypfs_create_cpu_files(): add missing check for hypfs_mkdir() failure 2025-05-29 11:02:15 +02:00
include s390/tlb: Use mm_has_pgste() instead of mm_alloc_pgste() 2025-05-29 11:02:13 +02:00
kernel s390/entry: Fix last breaking event handling in case of stack corruption 2025-05-18 08:24:47 +02:00
kvm KVM: s390: Don't use %pK through debug printing 2025-05-02 07:59:21 +02:00
lib s390/alternatives: Rework to allow for callbacks 2024-07-23 16:02:31 +02:00
mm s390: Remove ioremap_wt() and pgprot_writethrough() 2025-04-10 14:39:18 +02:00
net s390/bpf: Store backchain even for leaf progs 2025-06-19 15:31:49 +02:00
pci s390/pci: Fix missing check for zpci_create_device() error return 2025-05-18 08:24:47 +02:00
purgatory s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS 2025-02-08 09:58:19 +01:00
tools s390 updates for 6.12 merge window 2024-09-21 09:02:54 -07:00
Kbuild - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
Kconfig s390/sclp: Initialize sclp subsystem via arch_cpu_finalize_init() 2025-02-08 09:58:07 +01:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390: Fix linker error when -no-pie option is unavailable 2025-04-20 10:15:59 +02:00
Makefile.postlink s390/build: Avoid relocation information in final vmlinux 2024-08-27 20:16:48 +02:00