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

From: Aaron Tomlin

Date: Fri Dec 04 2026 - 21:45:30 EST


On Fri, Nov 06, 2026 at 11:45:18AM -0500, Aaron Tomlin wrote:
> This patch series extends the module_blacklist= command-line parameter (and
> its modern alias module_denylist=) to intercept built-in modules during
> early boot. Currently, when a driver is compiled statically into the kernel
> (=y), the parameter is silently ignored, precluding administrators from
> suppressing problematic drivers during boot-time disaster recovery. This
> series resolves that discrepancy by mapping built-in modules to their
> initialisation routines via transient metadata that is freed post-boot,
> providing a predictable and consistent administrative interface regardless
> of whether a driver is built as a loadable module or compiled into the
> kernel image. Below is a detailed breakdown of the motivation, operational
> rationale, and concrete use cases addressed by this work.

Hi all,

Following up on this series posted on 6 November [1], as it has not yet
received any feedback.

Petr, Daniel, Luis, Sami: when you have a moment, could you please take a
look and share any comments on the current revision? Also, Miguel, Boqun,
Gary, Josh, any feedback on the Rust and objtool respective hunks in patch 2
would likewise be very much appreciated.

With regard to the earlier arm64 allyesconfig revert on v11 [2], the linker
log showed "file truncated" in GNU ld alongside invalid $d references into
discarded sections from unrelated sections (__patchable_function_entries
and .init_array) in kernel/kheaders.o immediately after pagemap-headers
triggered a kheaders.o rebuild, which suggests a truncated or stale object
file rather than a defect in .initcall.modnames.

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
tools/objtool/klp-diff.c. It has been built and runtime-tested on x86_64
under virtme-ng with both built-in C (kheaders) and built-in Rust
(rust_minimal) modules, verifying module_denylist=, the legacy
module_blacklist= alias, and hyphen/underscore equivalence.

Provided there are no objections from the module maintainers, Andrew, would
you be willing to queue the series into mm-nonmm-unstable for wider
linux-next build and soak testing, or would the module maintainers prefer
to carry it via modules-next?

Incidentally, patch 1 ("module: Treat dashes and underscores
interchangeably in module_blacklist") is a self-contained fix in
kernel/module/main.c; I would be quite happy to split it out and submit it
separately if that is preferable while patches 2 and 3 are under
discussion.

[1]: https://lore.kernel.org/all/20261106164521.116168-1-atomlin@xxxxxxxxxxx/
[2]: https://lore.kernel.org/all/d930924e-17ff-4b3d-82a0-7220abfd121e@xxxxxxxxxxxxx/


Kind regards,
--
Aaron Tomlin