Thread (20 messages) 20 messages, 7 authors, 19d ago

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

From: Aaron Tomlin <atomlin@atomlin.com>
Date: 2026-09-10 01:32:45
Also in: linux-arch, lkml, rust-for-linux

On Wed, Sep 09, 2026 at 01:22:49PM +0000, Alice Ryhl wrote:
On Sun, Sep 06, 2026 at 10:08:57AM -0400, Aaron Tomlin wrote:
quoted
    2.  Mangled Names in Rust

        For drivers written in Rust, initcall symbols are compiler-mangled,
        which makes initcall_blacklist= virtually impossible for a user to
        specify at a boot prompt.
Are you sure?

As far as I can tell, the Rust module! macro applies #[no_mangle] to the
initcall, so no mangling should apply to it. Its name is the name of the
module followed by an underscore.

Alice
Hi Alice,

Sorry, I was wrong.

Looking at rust/kernel/module.rs, indeed #[no_mangle] ensures the symbols
are named __{module_name}_init and __{module_name}_exit without compiler
mangling.

Thank you for the follow up!

Kind regards,
-- 
Aaron Tomlin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help