All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@suse.de>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build warnings in Linus' tree
Date: Tue, 23 Nov 2021 08:04:34 +0100	[thread overview]
Message-ID: <YZySgpmBcNNM2qca@zn.tnic> (raw)
In-Reply-To: <20211123094419.08000327@canb.auug.org.au>

On Tue, Nov 23, 2021 at 09:44:19AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> Building Linus' tree, today's linux-next build (x86_64 allmodconfig)
> produced these warnings:
> 
> WARNING: modpost: vmlinux.o(.text.unlikely+0x63df): Section mismatch in reference from the function prepare_command_line() to the variable .init.data:builtin_cmdline
> The function prepare_command_line() references
> the variable __initdata builtin_cmdline.
> This is often because prepare_command_line lacks a __initdata 
> annotation or the annotation of builtin_cmdline is wrong.

Doesn't trigger with my toolchain, because it simply inlines that
function.

Anyway, fix is trivial, thanks for reporting.

---
From 4f4226a7dce0c5b6d911574f7fa5870c4ee693ff Mon Sep 17 00:00:00 2001
From: Borislav Petkov <bp@suse.de>
Date: Tue, 23 Nov 2021 07:53:57 +0100
Subject: [PATCH] x86/boot: Mark prepare_command_line() __init

Fix:

  WARNING: modpost: vmlinux.o(.text.unlikely+0x64d0): Section mismatch in reference \
   from the function prepare_command_line() to the variable .init.data:command_line
  The function prepare_command_line() references
  the variable __initdata command_line.
  This is often because prepare_command_line lacks a __initdata
  annotation or the annotation of command_line is wrong.

Apparently some toolchains do different inlining decisions.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20211123094419.08000327@canb.auug.org.au
---
 arch/x86/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index c410be738ae7..6a190c7f4d71 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -742,7 +742,7 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
 	return 0;
 }
 
-static char *prepare_command_line(void)
+static char * __init prepare_command_line(void)
 {
 #ifdef CONFIG_CMDLINE_BOOL
 #ifdef CONFIG_CMDLINE_OVERRIDE
-- 
2.29.2

-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Ivo Totev, HRB 36809, AG Nürnberg

  reply	other threads:[~2021-11-23  7:04 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 22:44 linux-next: build warnings in Linus' tree Stephen Rothwell
2021-11-23  7:04 ` Borislav Petkov [this message]
2021-11-24 12:30   ` [tip: x86/urgent] x86/boot: Mark prepare_command_line() __init tip-bot2 for Borislav Petkov
  -- strict thread matches above, loose matches on Subject: below --
2022-06-14  6:57 linux-next: build warnings in Linus' tree Stephen Rothwell
2022-05-26  7:21 Stephen Rothwell
2022-01-27  4:30 Stephen Rothwell
2022-01-27  6:01 ` Christoph Hellwig
2022-01-27 16:44   ` Stephen Rothwell
2022-01-27  4:24 Stephen Rothwell
2021-11-05  5:03 Stephen Rothwell
2021-10-12 10:56 Stephen Rothwell
2021-10-12 20:13 ` Randy Dunlap
2021-10-08  5:47 Stephen Rothwell
2021-10-08  5:47 ` Stephen Rothwell
2021-10-10 21:27 ` Stephen Rothwell
2021-10-10 21:27   ` Stephen Rothwell
2021-10-11 20:42   ` Rob Herring
2021-10-11 20:42     ` Rob Herring
2021-10-12 14:39     ` Arnd Bergmann
2021-10-12 14:39       ` Arnd Bergmann
2021-10-13 22:12       ` Anatolij Gustschin
2021-10-13 22:12         ` Anatolij Gustschin
2021-10-13 22:17         ` Rob Herring
2021-10-13 22:17           ` Rob Herring
2021-10-13 22:28           ` Anatolij Gustschin
2021-10-13 22:28             ` Anatolij Gustschin
2021-10-13 23:22             ` Rob Herring
2021-10-13 23:22               ` Rob Herring
2021-10-14  8:44         ` Arnd Bergmann
2021-10-14  8:44           ` Arnd Bergmann
2021-10-14 12:24           ` Anatolij Gustschin
2021-10-14 12:24             ` Anatolij Gustschin
2020-09-07 23:11 Stephen Rothwell
2020-09-08 13:14 ` Josh Poimboeuf
2020-09-09  0:15   ` Stephen Rothwell
2020-04-03 22:19 Stephen Rothwell
2020-04-03 23:16 ` Rob Herring
2020-04-03 23:31   ` Nicolas Saenz Julienne
2017-11-13 21:52 Stephen Rothwell
2017-11-13 22:03 ` Linus Torvalds
2013-07-04  4:58 Stephen Rothwell
2013-07-09 21:48 ` Nikolova, Tatyana E
2011-08-15  1:57 Stephen Rothwell
2011-05-23  1:25 Stephen Rothwell
2011-05-23  2:31 ` Eduardo Silva
2011-01-14  0:17 Stephen Rothwell
2011-01-14  0:09 Stephen Rothwell
2011-01-14  0:17 ` Andrew Morton
2011-01-14  1:06   ` Greg KH
2010-08-17  1:24 Stephen Rothwell
2010-08-30  1:42 ` Stephen Rothwell
2010-08-30  6:08   ` Zhang Rui
2010-09-03  2:01     ` Stephen Rothwell
2010-09-03  2:36     ` Len Brown
2010-09-17  4:26     ` Stephen Rothwell
2010-09-27 13:31       ` Stephen Rothwell
2010-08-07  2:21 Stephen Rothwell
2010-08-07  8:13 ` Vikas Chaudhary

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=YZySgpmBcNNM2qca@zn.tnic \
    --to=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.