lkml.org 
[lkml]   [2018]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] x86: make __ibp_barrier visible
Date
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
\
 
 \ /
  Last update: 2018-02-05 16:16    [W:0.038 / U:1.044 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site