]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bpf: Remove __prog kfunc arg annotation
authorIhor Solodrai <ihor.solodrai@linux.dev>
Tue, 20 Jan 2026 22:26:37 +0000 (14:26 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 21 Jan 2026 00:22:38 +0000 (16:22 -0800)
Now that all the __prog suffix users in the kernel tree migrated to
KF_IMPLICIT_ARGS, remove it from the verifier.

See prior discussion for context [1].

[1] https://lore.kernel.org/bpf/CAEf4BzbgPfRm9BX=TsZm-TsHFAHcwhPY4vTt=9OT-uhWqf8tqw@mail.gmail.com/

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260120222638.3976562-13-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c

index 8e8570e9d167a49f2206eda51f7157f3dce598fd..91955661450515e2b1ec5464b68a4819607af26b 100644 (file)
@@ -12211,13 +12211,6 @@ static bool is_kfunc_arg_irq_flag(const struct btf *btf, const struct btf_param
        return btf_param_match_suffix(btf, arg, "__irq_flag");
 }
 
-static bool is_kfunc_arg_prog_aux(const struct btf *btf, const struct btf_param *arg);
-
-static bool is_kfunc_arg_prog(const struct btf *btf, const struct btf_param *arg)
-{
-       return btf_param_match_suffix(btf, arg, "__prog") || is_kfunc_arg_prog_aux(btf, arg);
-}
-
 static bool is_kfunc_arg_scalar_with_name(const struct btf *btf,
                                          const struct btf_param *arg,
                                          const char *name)
@@ -13280,8 +13273,8 @@ static int check_kfunc_args(struct bpf_verifier_env *env, struct bpf_kfunc_call_
                if (is_kfunc_arg_ignore(btf, &args[i]))
                        continue;
 
-               if (is_kfunc_arg_prog(btf, &args[i])) {
-                       /* Used to reject repeated use of __prog. */
+               if (is_kfunc_arg_prog_aux(btf, &args[i])) {
+                       /* Reject repeated use bpf_prog_aux */
                        if (meta->arg_prog) {
                                verifier_bug(env, "Only 1 prog->aux argument supported per-kfunc");
                                return -EFAULT;