Commit a14bff13 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Ingo Molnar

x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels

In the following commit:

  9e0e3c51 ("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: default avatarAndy Whitcroft <apw@canonical.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180314112427.22351-1-apw@canonical.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent b5069782
...@@ -183,7 +183,10 @@ ...@@ -183,7 +183,10 @@
* otherwise we'll run out of registers. We don't care about CET * otherwise we'll run out of registers. We don't care about CET
* here, anyway. * here, anyway.
*/ */
# define CALL_NOSPEC ALTERNATIVE("call *%[thunk_target]\n", \ # define CALL_NOSPEC \
ALTERNATIVE( \
ANNOTATE_RETPOLINE_SAFE \
"call *%[thunk_target]\n", \
" jmp 904f;\n" \ " jmp 904f;\n" \
" .align 16\n" \ " .align 16\n" \
"901: call 903f;\n" \ "901: call 903f;\n" \
......
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