mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Andi Kleen <ak@linux.intel.com>
Cc: nico@linaro.org, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, David Woodhouse <dwmw@amazon.co.uk>,
	Borislav Petkov <bp@suse.de>
Subject: [PATCH 2/2] x86: make __ibp_barrier visible
Date: Mon,  5 Feb 2018 16:12:53 +0100	[thread overview]
Message-ID: <20180205151300.539874-3-arnd@arndb.de> (raw)
In-Reply-To: <20180205151300.539874-1-arnd@arndb.de>

LTO linking was broken by the addition of __ibp_barrier, which only
has relocations from assembler code, and not from C, so the linker
decides to drop it:

./ccfzUJ1l.ltrans0.ltrans.o:(.altinstr_replacement+0x42): undefined reference to `__ibp_barrier'

Fixes: 64e16720ea08 ("x86/speculation: Simplify indirect_branch_prediction_barrier()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/kernel/cpu/bugs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 71949bf2de5a..c3f5fe1c6e83 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -338,7 +338,7 @@ ssize_t cpu_show_spectre_v2(struct device *dev,
 }
 #endif
 
-void __ibp_barrier(void)
+void __visible __ibp_barrier(void)
 {
 	__wrmsr(MSR_IA32_PRED_CMD, PRED_CMD_IBPB, 0);
 }
-- 
2.9.0

      parent reply	other threads:[~2018-02-05 15:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-05 15:12 [PATCH 0/2] LTO: two more fixes Arnd Bergmann
2018-02-05 15:12 ` [PATCH 1/2] modpost: don't add warnings for LTO-generated symbols Arnd Bergmann
2018-02-05 15:50   ` Andi Kleen
2018-02-05 15:59     ` Arnd Bergmann
2018-02-05 16:22       ` Andi Kleen
2018-02-05 20:30         ` Arnd Bergmann
2018-02-05 15:12 ` Arnd Bergmann [this message]

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=20180205151300.539874-3-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=ak@linux.intel.com \
    --cc=bp@suse.de \
    --cc=dwmw@amazon.co.uk \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nico@linaro.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 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®