Commit 30a59cc7 authored by Pu Lehui's avatar Pu Lehui Committed by Alexei Starovoitov
Browse files

riscv, bpf: Fix possible infinite tailcall when CONFIG_CFI_CLANG is enabled



When CONFIG_CFI_CLANG is enabled, the number of prologue instructions
skipped by tailcall needs to include the kcfi instruction, otherwise the
TCC will be initialized every tailcall is called, which may result in
infinite tailcalls.

Fixes: e63985ec ("bpf, riscv64/cfi: Support kCFI + BPF on riscv64")
Signed-off-by: default avatarPu Lehui <pulehui@huawei.com>
Acked-by: default avatarBjörn Töpel <bjorn@kernel.org>
Link: https://lore.kernel.org/r/20241008124544.171161-1-pulehui@huaweicloud.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 4538a38f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment