objtool,x86: Replace alternatives with .retpoline_sites
authorPeter Zijlstra <peterz@infradead.org>
Tue, 26 Oct 2021 12:01:36 +0000 (14:01 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 28 Oct 2021 21:25:25 +0000 (23:25 +0200)
commit134ab5bd1883312d7a4b3033b05c6b5a1bb8889b
tree39d11f68c60a068c6d5ed56688e89a3907fe0ad4
parentc509331b41b7365e17396c246e8c5797bccc8074
objtool,x86: Replace alternatives with .retpoline_sites

Instead of writing complete alternatives, simply provide a list of all
the retpoline thunk calls. Then the kernel is free to do with them as
it pleases. Simpler code all-round.

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.850007165@infradead.org
arch/x86/kernel/vmlinux.lds.S
tools/objtool/arch/x86/decode.c
tools/objtool/check.c
tools/objtool/elf.c
tools/objtool/include/objtool/elf.h
tools/objtool/special.c