On Fri, 2025-09-05 at 17:45 +0100, Mykyta Yatsenko wrote: > From: Mykyta Yatsenko <yatsenko@xxxxxxxx> > > Refactor the verifier by pulling the common logic from > process_timer_func() into a dedicated helper. This allows reusing > process_async_func() helper for verifying bpf_task_work struct in the > next patch. > > Signed-off-by: Mykyta Yatsenko <yatsenko@xxxxxxxx> > --- > kernel/bpf/verifier.c | 39 ++++++++++++++++++++++++--------------- > 1 file changed, 24 insertions(+), 15 deletions(-) > > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > index b9394f8fac0e..a5d19a01d488 100644 > --- a/kernel/bpf/verifier.c > +++ b/kernel/bpf/verifier.c > @@ -8520,43 +8520,52 @@ static int process_spin_lock(struct bpf_verifier_env *env, int regno, int flags) > return 0; > } > > -static int process_timer_func(struct bpf_verifier_env *env, int regno, > - struct bpf_call_arg_meta *meta) > +static int process_async_func(struct bpf_verifier_env *env, int regno, struct bpf_map **map_ptr, > + int *map_uid, u32 rec_off, enum btf_field_type field_type, > + const char *struct_name) Also, it appears that process_wq_func() needs to have the same checks as in process_async_func(). Maybe add it as a separate commit? [...]