Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86/srso: Fix build breakage with the LLVM linker
The assertion added to verify the difference in bits set of the addresses of srso_untrain_ret_alias() and srso_safe_ret_alias() would fail to link in LLVM's ld.lld linker with the following error: ld.lld: error: ./arch/x86/kernel/vmlinux.lds:210: at least one side of the expression must be absolute ld.lld: error: ./arch/x86/kernel/vmlinux.lds:211: at least one side of the expression must be absolute Use ABSOLUTE to evaluate the expression referring to at least one of the symbols so that LLD can evaluate the linker script. Also, add linker version info to the comment about XOR being unsupported in either ld.bfd or ld.lld until somewhat recently. Fixes: fb3bd91 ("x86/srso: Add a Speculative RAS Overflow mitigation") Closes: https://lore.kernel.org/llvm/CA+G9fYsdUeNu-gwbs0+T6XHi4hYYk=Y9725-wFhZ7gJMspLDRA@mail.gmail.com/ Reported-by: Nathan Chancellor <[email protected]> Reported-by: Daniel Kolesa <[email protected]> Reported-by: Naresh Kamboju <[email protected]> Suggested-by: Sven Volkinsfeld <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: ClangBuiltLinux#1907 Link: https://lore.kernel.org/r/[email protected]
- Loading branch information