Skip to content

Commit a14bff1

Browse files
Andy WhitcroftIngo Molnar
authored andcommitted
x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels
In the following commit: 9e0e3c5 ("x86/speculation, objtool: Annotate indirect calls/jumps for objtool") ... we added annotations for CALL_NOSPEC/JMP_NOSPEC on 64-bit x86 kernels, but we did not annotate the 32-bit path. Annotate it similarly. Signed-off-by: Andy Whitcroft <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dan Williams <[email protected]> Cc: Dave Hansen <[email protected]> Cc: David Woodhouse <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent b506978 commit a14bff1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/x86/include/asm/nospec-branch.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@
183183
* otherwise we'll run out of registers. We don't care about CET
184184
* here, anyway.
185185
*/
186-
# define CALL_NOSPEC ALTERNATIVE("call *%[thunk_target]\n", \
186+
# define CALL_NOSPEC \
187+
ALTERNATIVE( \
188+
ANNOTATE_RETPOLINE_SAFE \
189+
"call *%[thunk_target]\n", \
187190
" jmp 904f;\n" \
188191
" .align 16\n" \
189192
"901: call 903f;\n" \

0 commit comments

Comments
 (0)