Messages in this thread Patch in this message | | | From | Arnd Bergmann <> | Subject | [PATCH 2/2] x86: make __ibp_barrier visible | Date | Mon, 5 Feb 2018 16:12:53 +0100 |
| |
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
| |