]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/retpoline: Move the retpoline thunk declarations to nospec-branch.h
authorPeter Zijlstra <peterz@infradead.org>
Tue, 26 Oct 2021 12:01:40 +0000 (14:01 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 28 Oct 2021 21:25:27 +0000 (23:25 +0200)
Because it makes no sense to split the retpoline gunk over multiple
headers.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Tested-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/r/20211026120310.106290934@infradead.org
arch/x86/include/asm/asm-prototypes.h
arch/x86/include/asm/nospec-branch.h
arch/x86/net/bpf_jit_comp.c

index a2bed09d3c1189bfd94c0c6e19cfcf30ff81caa7..8f80de627c60a8accabc0c6bcc1595045f0af53c 100644 (file)
 extern void cmpxchg8b_emu(void);
 #endif
 
-#ifdef CONFIG_RETPOLINE
-
-#define GEN(reg) \
-       extern asmlinkage void __x86_indirect_thunk_ ## reg (void);
-#include <asm/GEN-for-each-reg.h>
-#undef GEN
-
-#endif /* CONFIG_RETPOLINE */
index ec2d5c8c6694774ffec3700fe62082ac88553ed9..14053cd314b9b1f785f4d4cd868f9b7c05b3aadf 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <linux/static_key.h>
 #include <linux/objtool.h>
+#include <linux/linkage.h>
 
 #include <asm/alternative.h>
 #include <asm/cpufeatures.h>
        ".popsection\n\t"
 
 #ifdef CONFIG_RETPOLINE
+
+#define GEN(reg) \
+       extern asmlinkage void __x86_indirect_thunk_ ## reg (void);
+#include <asm/GEN-for-each-reg.h>
+#undef GEN
+
 #ifdef CONFIG_X86_64
 
 /*
index 9ea57389c554b7313d726e780fc51fea6977a761..7c03af65a7de0fbad9ccc44172f4cb9f0e9fb3a1 100644 (file)
@@ -15,7 +15,6 @@
 #include <asm/set_memory.h>
 #include <asm/nospec-branch.h>
 #include <asm/text-patching.h>
-#include <asm/asm-prototypes.h>
 
 static u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len)
 {