Messages in this thread | | | Date | Wed, 26 Jul 2023 19:02:55 +0200 | From | "Arnd Bergmann" <> | Subject | Re: [PATCH] init: keep boot_command_line after init |
| |
On Wed, Jul 26, 2023, at 18:25, Nick Desaulniers wrote: > On Wed, Jul 26, 2023 at 7:33 AM Arnd Bergmann <arnd@kernel.org> wrote: >> >> From: Arnd Bergmann <arnd@arndb.de> >> >> The boot command line is not available after the init section gets discarded, >> so adding a permanent reference to it causes a link time warning: >> >> WARNING: modpost: vmlinux: section mismatch in reference: cmdline_load_proc_show+0x2 (section: .text) -> boot_command_line (section: .init.data) > > cmdline_load_proc_show is probably inlined, but should it also be > marked __init? It's lone call site seems to be __init AFAICT. >
No, that's not what it does: cmdline_load_proc_show() is called when someone reads /proc/cmdline_load from userspace. It's only the function that creates this procfs file that is __init, but the call happens later.
Arnd
| |