Re: [PATCH bpf-next v3 2/9] module: Add module_kallsyms_find_name()
From: Samuel Wu
Date: Wed Nov 25 2026 - 19:42:34 EST
[...]
> > + */
> > +int module_kallsyms_find_name(unsigned int *symnum,
> > + const struct kallsyms_name_query *q,
> > + unsigned long *value, char *name,
> > + char *module_name)
>
> Nit: kernel/module/kallsyms.c already contains a zoo of lookup functions
> with similar names. Adding module_kallsyms_find_name() adds more to the
> confusion, being similar to module_kallsyms_lookup_name() and
> find_kallsyms_symbol_value().
>
> I suggest calling it module_kallsyms_query_name() to match the
> kallsyms_name_query parameter and to express that this is a structured
> query, as opposed to a simple by-name lookup. It might be a good idea to
> similarly stick to "query" instead of "find" in kernel/kallsyms.c.
>
> Otherwise, this looks ok to me from the modules perspective. Feel free
> to add:
>
> Reviewed-by: Petr Pavlu <petr.pavlu@xxxxxxxx>
>
> --
> Thanks,
> Petr
Sounds good, will apply s/find/query/ in v4. Thanks for the review Petr!