Skip to content

Commit 77f6711

Browse files
Peter Zijlstrabp3tk0v
authored andcommitted
x86/cpu: Fix __x86_return_thunk symbol type
Commit fb3bd91 ("x86/srso: Add a Speculative RAS Overflow mitigation") reimplemented __x86_return_thunk with a mix of SYM_FUNC_START and SYM_CODE_END, this is not a sane combination. Since nothing should ever actually 'CALL' this, make it consistently CODE. Fixes: fb3bd91 ("x86/srso: Add a Speculative RAS Overflow mitigation") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20230814121148.571027074@infradead.org
1 parent 833fd80 commit 77f6711

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/x86/lib/retpoline.S

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ SYM_CODE_END(srso_safe_ret)
263263
SYM_FUNC_END(srso_untrain_ret)
264264
__EXPORT_THUNK(srso_untrain_ret)
265265

266-
SYM_FUNC_START(__x86_return_thunk)
266+
SYM_CODE_START(__x86_return_thunk)
267+
UNWIND_HINT_FUNC
268+
ANNOTATE_NOENDBR
267269
ALTERNATIVE_2 "jmp __ret", "call srso_safe_ret", X86_FEATURE_SRSO, \
268270
"call srso_safe_ret_alias", X86_FEATURE_SRSO_ALIAS
269271
int3

0 commit comments

Comments
 (0)