Commit 0a3c4917 authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Borislav Petkov (AMD)

x86/rethunk: Use SYM_CODE_START[_LOCAL]_NOALIGN macros

Macros already exist for unaligned code block symbols.  Use them.
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Acked-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/26d461bd509cc840af24c94586561c06d39812b2.1693889988.git.jpoimboe@kernel.org
parent 34a3cae7
...@@ -149,7 +149,7 @@ SYM_CODE_END(__x86_indirect_jump_thunk_array) ...@@ -149,7 +149,7 @@ SYM_CODE_END(__x86_indirect_jump_thunk_array)
* As a result, srso_alias_safe_ret() becomes a safe return. * As a result, srso_alias_safe_ret() becomes a safe return.
*/ */
.pushsection .text..__x86.rethunk_untrain .pushsection .text..__x86.rethunk_untrain
SYM_START(srso_alias_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE) SYM_CODE_START_NOALIGN(srso_alias_untrain_ret)
UNWIND_HINT_FUNC UNWIND_HINT_FUNC
ANNOTATE_NOENDBR ANNOTATE_NOENDBR
ASM_NOP2 ASM_NOP2
...@@ -159,7 +159,7 @@ SYM_FUNC_END(srso_alias_untrain_ret) ...@@ -159,7 +159,7 @@ SYM_FUNC_END(srso_alias_untrain_ret)
.popsection .popsection
.pushsection .text..__x86.rethunk_safe .pushsection .text..__x86.rethunk_safe
SYM_START(srso_alias_safe_ret, SYM_L_GLOBAL, SYM_A_NONE) SYM_CODE_START_NOALIGN(srso_alias_safe_ret)
lea 8(%_ASM_SP), %_ASM_SP lea 8(%_ASM_SP), %_ASM_SP
UNWIND_HINT_FUNC UNWIND_HINT_FUNC
ANNOTATE_UNRET_SAFE ANNOTATE_UNRET_SAFE
...@@ -187,7 +187,7 @@ SYM_CODE_END(srso_alias_return_thunk) ...@@ -187,7 +187,7 @@ SYM_CODE_END(srso_alias_return_thunk)
*/ */
.align 64 .align 64
.skip 64 - (srso_safe_ret - srso_untrain_ret), 0xcc .skip 64 - (srso_safe_ret - srso_untrain_ret), 0xcc
SYM_START(srso_untrain_ret, SYM_L_LOCAL, SYM_A_NONE) SYM_CODE_START_LOCAL_NOALIGN(srso_untrain_ret)
ANNOTATE_NOENDBR ANNOTATE_NOENDBR
.byte 0x48, 0xb8 .byte 0x48, 0xb8
...@@ -255,7 +255,7 @@ SYM_CODE_END(srso_return_thunk) ...@@ -255,7 +255,7 @@ SYM_CODE_END(srso_return_thunk)
*/ */
.align 64 .align 64
.skip 64 - (retbleed_return_thunk - retbleed_untrain_ret), 0xcc .skip 64 - (retbleed_return_thunk - retbleed_untrain_ret), 0xcc
SYM_START(retbleed_untrain_ret, SYM_L_LOCAL, SYM_A_NONE) SYM_CODE_START_LOCAL_NOALIGN(retbleed_untrain_ret)
ANNOTATE_NOENDBR ANNOTATE_NOENDBR
/* /*
* As executed from retbleed_untrain_ret, this is: * As executed from retbleed_untrain_ret, this is:
......
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