summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAmery Hung <ameryhung@gmail.com>2026-09-11 15:03:59 -0700
committerAlexei Starovoitov <ast@kernel.org>2026-09-11 20:16:03 -0700
commit5fa6e69e2e6618bfa1061c8012aacf81798e2b1e (patch)
treee33cc3fb884782b7bea35373cb700cccf2aa9139 /include/linux
parent5e7edfe68654ae12125918eec0507566405a371f (diff)
downloadlinux-next-5fa6e69e2e6618bfa1061c8012aacf81798e2b1e.tar.gz
linux-next-5fa6e69e2e6618bfa1061c8012aacf81798e2b1e.zip
bpf: Classify kfunc arguments the verifier ignores
The verifier does not inspect __ign arguments or implicit arguments, except that bpf_prog_aux is handled specially. get_kfunc_arg_type() leaves the ignored arguments unclassified, so gen_kfunc_arg_proto() skips them and check_kfunc_args() repeats the same BTF predicates for every call. Add ARG_IGNORE and classify ignored arguments in get_kfunc_arg_type(). The generated prototype can then record them, and the call site can consume the recorded type without deriving the classification again. Keep bpf_prog_aux on its existing BTF-based path for now. No functional change. Signed-off-by: Amery Hung <ameryhung@gmail.com> Link: https://lore.kernel.org/r/20260911220415.1396439-8-ameryhung@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index ebfdf9d209f3..54af5562ec95 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -923,6 +923,7 @@ enum bpf_arg_type {
ARG_PTR_TO_TASK_WORK, /* pointer to bpf_task_work */
ARG_PTR_TO_IRQ_FLAG, /* pointer to saved IRQ flags on the stack */
ARG_PTR_TO_RES_SPIN_LOCK, /* pointer to bpf_res_spin_lock */
+ ARG_IGNORE, /* argument the verifier does not check at all */
__BPF_ARG_TYPE_MAX,
/* Extended arg_types. */