diff options
author | Leon Hwang <leon.hwang@linux.dev> | 2024-11-07 21:45:28 +0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-11-12 17:24:03 -0800 |
commit | a1087da9d11e5bcacc706002bc0f84b790881f69 (patch) | |
tree | 63f95a8b98035c471a2422a72ec921347e8ca440 /arch/x86/net | |
parent | faadc69af1ef68f2820fc29c874a42f1da2685f9 (diff) | |
download | linux-stable-a1087da9d11e5bcacc706002bc0f84b790881f69.tar.gz linux-stable-a1087da9d11e5bcacc706002bc0f84b790881f69.tar.bz2 linux-stable-a1087da9d11e5bcacc706002bc0f84b790881f69.zip |
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>
Diffstat (limited to 'arch/x86/net')
-rw-r--r-- | arch/x86/net/bpf_jit_comp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 8f896c32172c..a43fc5af973d 100644 --- a/arch/x86/net/bpf_jit_comp.c +++ b/arch/x86/net/bpf_jit_comp.c @@ -2186,7 +2186,7 @@ populate_extable: u8 *ip = image + addrs[i - 1]; func = (u8 *) __bpf_call_base + imm32; - if (tail_call_reachable) { + if (src_reg == BPF_PSEUDO_CALL && tail_call_reachable) { LOAD_TAIL_CALL_CNT_PTR(stack_depth); ip += 7; } |