lkml.org 
[lkml]   [2023]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2023-07-26 19:03    [W:0.053 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site