From: Aaron Tomlin <atomlin@atomlin.com>
To: arnd@arndb.de, mcgrof@kernel.org, petr.pavlu@suse.com,
da.gomez@kernel.org, samitolvanen@google.com,
peterz@infradead.org
Cc: akpm@linux-foundation.org, mhiramat@kernel.org,
atomlin@atomlin.com, neelx@suse.com, da.anzani@gmail.com,
sean@ashe.io, chjohnst@mail.com, steve@abita.co,
mproche@mail.com, nick.lane@mail.com, linux-arch@vger.kernel.org,
linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v5 0/2] module: Extend blacklist parameter to support built-in modules
Date: Sat, 18 Jul 2026 01:13:48 -0400 [thread overview]
Message-ID: <20260718051350.344772-1-atomlin@atomlin.com> (raw)
Currently, the "module_blacklist=" command-line parameter only applies to
loadable modules. If a module is built-in, the parameter is silently
ignored. This patch series extends the blacklisting functionality to
built-in modules by intercepting their initialisation routines during early
boot.
Following review feedback, the implementation has been split into two
separate changes to decouple the introduction of the new feature from the
terminology renaming:
1. The first patch extends the "module_blacklist=" parameter to
built-in modules using the original blacklist terminology. It
introduces the ".initcall.modnames" section to map initcall
function pointers to their associated KBUILD_MODNAME strings
(restricted only to module_init() invocations to save memory and
avoid matching core kernel subsystems). It also implements temporal
boundary checks to prevent use-after-free (UAF) risks when loading
dynamic modules, and a fast-path check to eliminate lookup overhead
during boot when the parameter is not in use
2. The second patch renames the variables and helper functions to
adopt the preferred "module_denylist=" and module_is_denylisted()
terminology in the codebase. To preserve the existing user-space
ABI, "module_blacklist=" is kept as a legacy alias pointing to the
same module_denylist variable
Aaron Tomlin (2):
module: Extend module_blacklist parameter to built-in modules
module: Rename module_blacklist to module_denylist
include/asm-generic/vmlinux.lds.h | 4 ++-
include/linux/init.h | 24 +++++++++++++++-
include/linux/module.h | 5 +++-
init/main.c | 47 +++++++++++++++++++++++++++++++
kernel/module/main.c | 24 ++--------------
5 files changed, 79 insertions(+), 25 deletions(-)
--
2.54.0
next reply other threads:[~2026-07-18 5:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 5:13 Aaron Tomlin [this message]
2026-07-18 5:13 ` [PATCH v5 1/2] module: Extend module_blacklist parameter to built-in modules Aaron Tomlin
2026-07-18 14:26 ` Aaron Tomlin
2026-07-18 5:13 ` [PATCH v5 2/2] 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=20260718051350.344772-1-atomlin@atomlin.com \
--to=atomlin@atomlin.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=chjohnst@mail.com \
--cc=da.anzani@gmail.com \
--cc=da.gomez@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mhiramat@kernel.org \
--cc=mproche@mail.com \
--cc=neelx@suse.com \
--cc=nick.lane@mail.com \
--cc=peterz@infradead.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
--cc=sean@ashe.io \
--cc=steve@abita.co \
/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