Re: [PATCH v14 0/3] module: Extend module_blacklist parameter to built-in modules

From: Aaron Tomlin

Date: Sat Dec 05 2026 - 17:09:04 EST


On Sat, Dec 05, 2026 at 04:42:42PM +0100, Miguel Ojeda wrote:
> On Sat, Dec 5, 2026 at 3:45 AM Aaron Tomlin <atomlin@xxxxxxxxxxx> wrote:
> >
> > Since v11, this revision has also fixed CONFIG_RUST=y build issues for
> > built-in Rust modules (moving struct initcall_modname outside #ifndef
> > MODULE for bindgen, adding the Sync wrapper InitcallModname, and allowing
> > non_upper_case_globals) as well as handling __modname_ symbols in
>
> This is referring to issues introduced in the series themselves,
> right? i.e. the new `initcall_modname` struct. If this is not correct,
> then please use a separate Fixes patch.
>
> I am also not sure I understand the "MODULE for bindgen" bit -- unless
> I am missing something, it is simply that one shouldn't add the
> entries to the sections if it is not a module, just like in `init.h`.
> In other words, it is unrelated to `bindgen`.
>
> Thanks!
>
> Cheers,
> Miguel

Hi Miguel,

Thank you for your prompt response.

Yes, all three items were fixes to earlier revisions of this series itself
for the new struct initcall_modname and .initcall.modnames support, not
pre-existing mainline issues.

On the bindgen point, in v11 [1], I had placed the struct initcall_modname
type definition itself inside the #ifndef MODULE block in
include/linux/init.h. Because cmd_bindgen in rust/Makefile unconditionally
passes -DMODULE when generating bindings_generated.rs, bindgen did not see
struct initcall_modname and therefore did not emit
bindings::initcall_modname.

Moving just the struct definition above #ifndef MODULE made the type
visible to bindgen, while the actual .initcall.modnames section entries
remain restricted to built-in modules (#ifndef MODULE in C and
#[cfg(not(MODULE))] in rust/macros/module.rs).

Please let me know if the Rust-specific changes in patch 2 look reasonable
to you.

[1]: https://lore.kernel.org/all/20260908203230.401020-3-atomlin@xxxxxxxxxxx/

Kind regards,
--
Aaron Tomlin