linux/arch
Leon Hwang 66ff4d61dc bpf, arm64: Fix tailcall hierarchy
This patch fixes a tailcall issue caused by abusing the tailcall in
bpf2bpf feature on arm64 like the way of "bpf, x64: Fix tailcall
hierarchy".

On arm64, when a tail call happens, it uses tail_call_cnt_ptr to
increment tail_call_cnt, too.

At the prologue of main prog, it has to initialize tail_call_cnt and
prepare tail_call_cnt_ptr.

At the prologue of subprog, it pushes x26 register twice, and does not
initialize tail_call_cnt.

At the epilogue, it pops x26 twice, no matter whether it is main prog or
subprog.

Fixes: d4609a5d8c ("bpf, arm64: Keep tail call count across bpf2bpf calls")
Acked-by: Puranjay Mohan <puranjay@kernel.org>
Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
Link: https://lore.kernel.org/r/20240714123902.32305-3-hffilwlqm@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
2024-07-29 12:53:38 -07:00
..
alpha
arc arc: convert to generic syscall table 2024-07-10 14:23:38 +02:00
arm Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
arm64 bpf, arm64: Fix tailcall hierarchy 2024-07-29 12:53:38 -07:00
csky ftrace: Rewrite of function graph tracer 2024-07-18 13:36:33 -07:00
hexagon hexagon: use new system call table 2024-07-10 14:23:38 +02:00
loongarch LoongArch changes for v6.11 2024-07-22 13:44:22 -07:00
m68k Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
microblaze syscalls: mmap(): use unsigned offset type consistently 2024-06-25 15:57:38 +02:00
mips - Use improved timer sync for Loongson64 2024-07-25 12:41:53 -07:00
nios2 Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
openrisc openrisc: convert to generic syscall table 2024-07-10 14:23:38 +02:00
parisc parisc architecture fixes and updates for kernel v6.11-rc1: 2024-07-25 12:37:42 -07:00
powerpc Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
riscv Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
s390 sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-25 12:58:36 -07:00
sh sh updates for v6.11 2024-07-23 11:57:52 -07:00
sparc Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
um This pull request contains the following changes for UML: 2024-07-25 12:33:08 -07:00
x86 bpf, x64: Fix tailcall hierarchy 2024-07-29 12:53:31 -07:00
xtensa - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
.gitignore
Kconfig