Commit b377c66a authored by Borislav Petkov (AMD)'s avatar Borislav Petkov (AMD) Committed by Ingo Molnar

x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk

srso_alias_untrain_ret() is special code, even if it is a dummy
which is called in the !SRSO case, so annotate it like its real
counterpart, to address the following objtool splat:

  vmlinux.o: warning: objtool: .export_symbol+0x2b290: data relocation to !ENDBR: srso_alias_untrain_ret+0x0

Fixes: 4535e1a4 ("x86/bugs: Fix the SRSO mitigation on Zen3/4")
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20240405144637.17908-1-bp@kernel.org
parent 5f2ca44e
...@@ -229,6 +229,7 @@ SYM_CODE_END(srso_return_thunk) ...@@ -229,6 +229,7 @@ SYM_CODE_END(srso_return_thunk)
/* Dummy for the alternative in CALL_UNTRAIN_RET. */ /* Dummy for the alternative in CALL_UNTRAIN_RET. */
SYM_CODE_START(srso_alias_untrain_ret) SYM_CODE_START(srso_alias_untrain_ret)
ANNOTATE_UNRET_SAFE ANNOTATE_UNRET_SAFE
ANNOTATE_NOENDBR
ret ret
int3 int3
SYM_FUNC_END(srso_alias_untrain_ret) SYM_FUNC_END(srso_alias_untrain_ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment