Re: [PATCH bpf-next v3 2/9] module: Add module_kallsyms_find_name()
From: Samuel Wu
Date: Wed Nov 25 2026 - 19:44:39 EST
[...]
> > --- a/include/linux/kallsyms.h
> > +++ b/include/linux/kallsyms.h
> > @@ -24,6 +24,13 @@
> > struct cred;
> > struct module;
> >
> > +/* Exact or prefix name query, optionally in one module. */
> > +struct kallsyms_name_query {
> > + const char *name;
> > + size_t cmp_len; /* bytes to compare; includes NUL if exact */
> > + const char *modname; /* NULL matches any module */
>
> will "vmlinux" match just vmlinux? or how can one express "I only need
> symbols from vmlinux image" with this?
At the ioctl layer (patch 3/9), passing "vmlinux" in query_module
restricts the search to vmlinux without calling
module_kallsyms_query_name(). I will clarify the comments in both
patches in v4.