aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2018-03-14 07:24:27 -0400
committerIngo Molnar <mingo@kernel.org>2018-03-14 08:24:31 -0400
commita14bff131108faf50cc0cf864589fd71ee216c96 (patch)
treeb045ff75e56cfdc9bb1371b1b25a67fb0b516aaf
parentb5069782453459f6ec1fdeb495d9901a4545fcb5 (diff)
x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels
In the following commit: 9e0e3c5130e9 ("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 <apw@canonical.com> Acked-by: Peter 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.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/include/asm/nospec-branch.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h
index b7063cfa19f9..b3996d60f981 100644
--- a/arch/x86/include/asm/nospec-branch.h
+++ b/arch/x86/include/asm/nospec-branch.h
@@ -183,7 +183,10 @@
183 * otherwise we'll run out of registers. We don't care about CET 183 * otherwise we'll run out of registers. We don't care about CET
184 * here, anyway. 184 * here, anyway.
185 */ 185 */
186# define CALL_NOSPEC ALTERNATIVE("call *%[thunk_target]\n", \ 186# define CALL_NOSPEC \
187 ALTERNATIVE( \
188 ANNOTATE_RETPOLINE_SAFE \
189 "call *%[thunk_target]\n", \
187 " jmp 904f;\n" \ 190 " jmp 904f;\n" \
188 " .align 16\n" \ 191 " .align 16\n" \
189 "901: call 903f;\n" \ 192 "901: call 903f;\n" \