Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bpf, x86: Propagate tailcall info only for subprogs

In x64 JIT, propagate tailcall info only for subprogs, not for helpers
or kfuncs.

Acked-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/20241107134529.8602-2-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Leon Hwang and committed by
Alexei Starovoitov
a1087da9 faadc69a

+1 -1
+1 -1
arch/x86/net/bpf_jit_comp.c
··· 2186 2186 u8 *ip = image + addrs[i - 1]; 2187 2187 2188 2188 func = (u8 *) __bpf_call_base + imm32; 2189 - if (tail_call_reachable) { 2189 + if (src_reg == BPF_PSEUDO_CALL && tail_call_reachable) { 2190 2190 LOAD_TAIL_CALL_CNT_PTR(stack_depth); 2191 2191 ip += 7; 2192 2192 }