From: "Arnd Bergmann" <arnd@arndb.de>
To: "Nick Desaulniers" <ndesaulniers@google.com>,
"Arnd Bergmann" <arnd@kernel.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Kees Cook" <keescook@chromium.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Sami Tolvanen" <samitolvanen@google.com>,
"Alexey Dobriyan" <adobriyan@gmail.com>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Josh Poimboeuf" <jpoimboe@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] init: keep boot_command_line after init
Date: Wed, 26 Jul 2023 19:02:55 +0200 [thread overview]
Message-ID: <034f0b5e-3c61-4392-8360-ebd57749d53e@app.fastmail.com> (raw)
In-Reply-To: <CAKwvOdnk+e_QmE+QpcqzntNVgf8mL+NOPtUggj4F__iTf_XD+A@mail.gmail.com>
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
next prev parent reply other threads:[~2023-07-26 17:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 14:33 Arnd Bergmann
2023-07-26 16:25 ` Nick Desaulniers
2023-07-26 17:02 ` Arnd Bergmann [this message]
2023-07-26 18:53 ` Paul E. McKenney
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=034f0b5e-3c61-4392-8360-ebd57749d53e@app.fastmail.com \
--to=arnd@arndb.de \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=ndesaulniers@google.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=samitolvanen@google.com \
/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
all inboxes | Powered by JetHome®