Skip to content

Commit b377c66

Browse files
bp3tk0vIngo Molnar
authored andcommitted
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: 4535e1a ("x86/bugs: Fix the SRSO mitigation on Zen3/4") Signed-off-by: Borislav Petkov (AMD) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Linus Torvalds <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5f2ca44 commit b377c66

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/lib/retpoline.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ SYM_CODE_END(srso_return_thunk)
229229
/* Dummy for the alternative in CALL_UNTRAIN_RET. */
230230
SYM_CODE_START(srso_alias_untrain_ret)
231231
ANNOTATE_UNRET_SAFE
232+
ANNOTATE_NOENDBR
232233
ret
233234
int3
234235
SYM_FUNC_END(srso_alias_untrain_ret)

0 commit comments

Comments
 (0)