Skip to content

Commit aa730cf

Browse files
jpoimboebp3tk0v
authored andcommitted
x86/srso: Improve i-cache locality for alias mitigation
Move srso_alias_return_thunk() to the same section as srso_alias_safe_ret() so they can share a cache line. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Acked-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/eadaf5530b46a7ae8b936522da45ae555d2b3393.1693889988.git.jpoimboe@kernel.org
1 parent eeb9f34 commit aa730cf

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

arch/x86/lib/retpoline.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,14 @@ SYM_START(srso_alias_safe_ret, SYM_L_GLOBAL, SYM_A_NONE)
177177
int3
178178
SYM_FUNC_END(srso_alias_safe_ret)
179179

180-
.section .text..__x86.return_thunk
181-
182-
SYM_CODE_START(srso_alias_return_thunk)
180+
SYM_CODE_START_NOALIGN(srso_alias_return_thunk)
183181
UNWIND_HINT_FUNC
184182
ANNOTATE_NOENDBR
185183
call srso_alias_safe_ret
186184
ud2
187185
SYM_CODE_END(srso_alias_return_thunk)
188186

187+
.section .text..__x86.return_thunk
189188
/*
190189
* Some generic notes on the untraining sequences:
191190
*

0 commit comments

Comments
 (0)