From: Carlos Llamas Date: Thu, 12 Mar 2026 18:38:17 +0000 (+0000) Subject: bpf: Switch CONFIG_CFI_CLANG to CONFIG_CFI X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b0cf064ea0a6bac5e1a5fb43b004fd52fbe2b3b;p=thirdparty%2Flinux.git bpf: Switch CONFIG_CFI_CLANG to CONFIG_CFI This was renamed in commit 23ef9d439769 ("kcfi: Rename CONFIG_CFI_CLANG to CONFIG_CFI") as it is now a compiler-agnostic option. Using the wrong name results in the code getting compiled out. Meaning the CFI failures for btf_dtor_kfunc_t would still trigger. Fixes: 99fde4d06261 ("bpf, btf: Enforce destructor kfunc type with CFI") Signed-off-by: Carlos Llamas Reviewed-by: Sami Tolvanen Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20260312183818.2721750-1-cmllamas@google.com Signed-off-by: Alexei Starovoitov --- diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index c5876c91face3..0c465f0077d54 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -9020,7 +9020,7 @@ static int btf_check_dtor_kfuncs(struct btf *btf, const struct btf_id_dtor_kfunc if (!t || !btf_type_is_ptr(t)) return -EINVAL; - if (IS_ENABLED(CONFIG_CFI_CLANG)) { + if (IS_ENABLED(CONFIG_CFI)) { /* Ensure the destructor kfunc type matches btf_dtor_kfunc_t */ t = btf_type_by_id(btf, t->type); if (!btf_type_is_void(t))