aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/alternative-asm.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2019-03-18 14:33:07 +0100
committerIngo Molnar <mingo@kernel.org>2019-04-03 09:39:46 +0200
commitff05ab2305aaeb21a3002ae95a17e176c198b71b (patch)
treec65ef588d4ec4bc4a590a07a69a394c2c4a046c5 /arch/x86/include/asm/alternative-asm.h
parentx86/uaccess: Fix up the fixup (diff)
downloadlinux-dev-ff05ab2305aaeb21a3002ae95a17e176c198b71b.tar.xz
linux-dev-ff05ab2305aaeb21a3002ae95a17e176c198b71b.zip
x86/nospec, objtool: Introduce ANNOTATE_IGNORE_ALTERNATIVE
To facillitate other usage of ignoring alternatives; rename ANNOTATE_NOSPEC_IGNORE to ANNOTATE_IGNORE_ALTERNATIVE. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Borislav Petkov <bp@alien8.de> 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> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/alternative-asm.h')
-rw-r--r--arch/x86/include/asm/alternative-asm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/include/asm/alternative-asm.h b/arch/x86/include/asm/alternative-asm.h
index 31b627b43a8e..464034db299f 100644
--- a/arch/x86/include/asm/alternative-asm.h
+++ b/arch/x86/include/asm/alternative-asm.h
@@ -20,6 +20,17 @@
#endif
/*
+ * objtool annotation to ignore the alternatives and only consider the original
+ * instruction(s).
+ */
+.macro ANNOTATE_IGNORE_ALTERNATIVE
+ .Lannotate_\@:
+ .pushsection .discard.ignore_alts
+ .long .Lannotate_\@ - .
+ .popsection
+.endm
+
+/*
* Issue one struct alt_instr descriptor entry (need to put it into
* the section .altinstructions, see below). This entry contains
* enough information for the alternatives patching code to patch an