Skip to content

Commit a1087da

Browse files
AsphalttAlexei Starovoitov
authored andcommitted
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 <[email protected]> Signed-off-by: Leon Hwang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent faadc69 commit a1087da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/net/bpf_jit_comp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2186,7 +2186,7 @@ st: if (is_imm8(insn->off))
21862186
u8 *ip = image + addrs[i - 1];
21872187

21882188
func = (u8 *) __bpf_call_base + imm32;
2189-
if (tail_call_reachable) {
2189+
if (src_reg == BPF_PSEUDO_CALL && tail_call_reachable) {
21902190
LOAD_TAIL_CALL_CNT_PTR(stack_depth);
21912191
ip += 7;
21922192
}

0 commit comments

Comments
 (0)