x86/retpoline: Remove unused replacement symbols
commit 4fe79e710d9574a14993f8b4e16b7252da72d5e8 upstream. Now that objtool no longer creates alternatives, these replacement symbols are no longer needed, remove them. 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/20211026120309.915051744@infradead.org Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
908bd980a8
commit
ccb8fc65a3
@@ -24,14 +24,4 @@ extern void cmpxchg8b_emu(void);
|
|||||||
extern asmlinkage void __x86_indirect_thunk_ ## reg (void);
|
extern asmlinkage void __x86_indirect_thunk_ ## reg (void);
|
||||||
#include <asm/GEN-for-each-reg.h>
|
#include <asm/GEN-for-each-reg.h>
|
||||||
|
|
||||||
#undef GEN
|
|
||||||
#define GEN(reg) \
|
|
||||||
extern asmlinkage void __x86_indirect_alt_call_ ## reg (void);
|
|
||||||
#include <asm/GEN-for-each-reg.h>
|
|
||||||
|
|
||||||
#undef GEN
|
|
||||||
#define GEN(reg) \
|
|
||||||
extern asmlinkage void __x86_indirect_alt_jmp_ ## reg (void);
|
|
||||||
#include <asm/GEN-for-each-reg.h>
|
|
||||||
|
|
||||||
#endif /* CONFIG_RETPOLINE */
|
#endif /* CONFIG_RETPOLINE */
|
||||||
|
@@ -40,36 +40,6 @@ SYM_FUNC_END(__x86_indirect_thunk_\reg)
|
|||||||
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/*
|
|
||||||
* This generates .altinstr_replacement symbols for use by objtool. They,
|
|
||||||
* however, must not actually live in .altinstr_replacement since that will be
|
|
||||||
* discarded after init, but module alternatives will also reference these
|
|
||||||
* symbols.
|
|
||||||
*
|
|
||||||
* Their names matches the "__x86_indirect_" prefix to mark them as retpolines.
|
|
||||||
*/
|
|
||||||
.macro ALT_THUNK reg
|
|
||||||
|
|
||||||
.align 1
|
|
||||||
|
|
||||||
SYM_FUNC_START_NOALIGN(__x86_indirect_alt_call_\reg)
|
|
||||||
ANNOTATE_RETPOLINE_SAFE
|
|
||||||
1: call *%\reg
|
|
||||||
2: .skip 5-(2b-1b), 0x90
|
|
||||||
SYM_FUNC_END(__x86_indirect_alt_call_\reg)
|
|
||||||
|
|
||||||
STACK_FRAME_NON_STANDARD(__x86_indirect_alt_call_\reg)
|
|
||||||
|
|
||||||
SYM_FUNC_START_NOALIGN(__x86_indirect_alt_jmp_\reg)
|
|
||||||
ANNOTATE_RETPOLINE_SAFE
|
|
||||||
1: jmp *%\reg
|
|
||||||
2: .skip 5-(2b-1b), 0x90
|
|
||||||
SYM_FUNC_END(__x86_indirect_alt_jmp_\reg)
|
|
||||||
|
|
||||||
STACK_FRAME_NON_STANDARD(__x86_indirect_alt_jmp_\reg)
|
|
||||||
|
|
||||||
.endm
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Despite being an assembler file we can't just use .irp here
|
* Despite being an assembler file we can't just use .irp here
|
||||||
* because __KSYM_DEPS__ only uses the C preprocessor and would
|
* because __KSYM_DEPS__ only uses the C preprocessor and would
|
||||||
@@ -92,15 +62,3 @@ STACK_FRAME_NON_STANDARD(__x86_indirect_alt_jmp_\reg)
|
|||||||
#undef GEN
|
#undef GEN
|
||||||
#define GEN(reg) EXPORT_THUNK(reg)
|
#define GEN(reg) EXPORT_THUNK(reg)
|
||||||
#include <asm/GEN-for-each-reg.h>
|
#include <asm/GEN-for-each-reg.h>
|
||||||
|
|
||||||
#undef GEN
|
|
||||||
#define GEN(reg) ALT_THUNK reg
|
|
||||||
#include <asm/GEN-for-each-reg.h>
|
|
||||||
|
|
||||||
#undef GEN
|
|
||||||
#define GEN(reg) __EXPORT_THUNK(__x86_indirect_alt_call_ ## reg)
|
|
||||||
#include <asm/GEN-for-each-reg.h>
|
|
||||||
|
|
||||||
#undef GEN
|
|
||||||
#define GEN(reg) __EXPORT_THUNK(__x86_indirect_alt_jmp_ ## reg)
|
|
||||||
#include <asm/GEN-for-each-reg.h>
|
|
||||||
|
Reference in New Issue
Block a user