From: sashiko-bot@kernel.org
To: "Aaron Tomlin" <atomlin@atomlin.com>
Cc: linux-modules@vger.kernel.org, "Petr Pavlu" <petr.pavlu@suse.com>,
ojeda@kernel.org, gary@garyguo.net
Subject: Re: [PATCH v12 2/3] module: Extend module_blacklist parameter to built-in modules
Date: Tue, 03 Nov 2026 22:01:28 +0000 [thread overview]
Message-ID: <sashiko-outbox-196090@kernel.org> (raw)
In-Reply-To: <20261103214223.32598-3-atomlin@atomlin.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] module: missing kernel-parameters.txt update for module_blacklist=
--
commit b07237b9f1588393358dd2a97ba3add75969d76b
Author: Aaron Tomlin <atomlin@atomlin.com>
module: Extend module_blacklist parameter to built-in modules
This commit extends the module_blacklist= command-line parameter to built-in
modules by recording their initcall functions and module names in a
.initcall.modnames section. During early boot, do_one_initcall_builtin()
checks this table and skips initcalls for blacklisted built-in modules, with
parameter handling moved to init/main.c so it also works when CONFIG_MODULES
is disabled.
> diff --git a/init/main.c b/init/main.c
> index d7bf1ffc5f503..99df129d3b296 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -1406,6 +1406,56 @@ static inline void do_trace_initcall_level(const char *level)
> }
> #endif /* !TRACEPOINTS_ENABLED */
>
> +extern struct initcall_modname __start_initcall_modnames[];
> +extern struct initcall_modname __stop_initcall_modnames[];
> +
> +/* module_blacklist is a comma-separated list of module names */
> +static char *module_blacklist;
> +bool __init_or_module module_is_blacklisted(const char *module_name)
> +{
> + const char *p;
> + size_t len;
> +
> + if (!module_blacklist)
> + return false;
> +
> + for (p = module_blacklist; *p; p += len) {
> + len = strcspn(p, ",");
> + if (strlen(module_name) == len && parameqn(module_name, p, len))
> + return true;
> + if (p[len] == ',')
> + len++;
> + }
> + return false;
> +}
> +core_param(module_blacklist, module_blacklist, charp, 0400);
[Severity: Low]
This patch moves core_param(module_blacklist, ...) to init/main.c and extends
module_blacklist= via do_one_initcall_builtin() so that it also skips
initcalls for built-in modules defined with module_init(), even when
CONFIG_MODULES=n.
However, Documentation/admin-guide/kernel-parameters.txt still describes
module_blacklist= only in terms of loading modules:
module_blacklist= [KNL] Do not load a comma-separated list of
modules. Useful for debugging problem modules.
The follow-up patch in the series (commit 7bf71ba917d2 ("module: Rename
module_blacklist to module_denylist")) renames the entry to module_denylist=
without updating this description either.
Should Documentation/admin-guide/kernel-parameters.txt be updated here to
mention that module_blacklist= also skips initialization of built-in modules?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103214223.32598-1-atomlin@atomlin.com?part=2
next prev parent reply other threads:[~2026-11-03 22:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 21:42 [PATCH v12 0/3] module: Extend module_blacklist parameter to built-in modules Aaron Tomlin
2026-11-03 21:42 ` [PATCH v12 1/3] module: Treat dashes and underscores interchangeably in module_blacklist Aaron Tomlin
2026-11-03 21:42 ` [PATCH v12 2/3] module: Extend module_blacklist parameter to built-in modules Aaron Tomlin
2026-11-03 22:01 ` sashiko-bot [this message]
2026-11-03 22:19 ` Aaron Tomlin
2026-11-03 21:42 ` [PATCH v12 3/3] module: Rename module_blacklist to module_denylist Aaron Tomlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-196090@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=atomlin@atomlin.com \
--cc=gary@garyguo.net \
--cc=linux-modules@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox