]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bpf: Switch CONFIG_CFI_CLANG to CONFIG_CFI
authorCarlos Llamas <cmllamas@google.com>
Thu, 12 Mar 2026 18:38:17 +0000 (18:38 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Mar 2026 15:42:24 +0000 (08:42 -0700)
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 <cmllamas@google.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20260312183818.2721750-1-cmllamas@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/btf.c

index c5876c91face38281134ad564e49bf91820425cc..0c465f0077d5495bafffdca88db6f22c0f4810be 100644 (file)
@@ -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))