]> www.infradead.org Git - users/dwmw2/linux.git/commit
objtool,x86: Replace alternatives with .retpoline_sites
authorPeter Zijlstra <peterz@infradead.org>
Tue, 26 Oct 2021 12:01:36 +0000 (14:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Jul 2022 09:26:23 +0000 (11:26 +0200)
commit908bd980a80ea23ff834c3fff828c3d37ada6cc2
tree5244490eed97a8aabc5fc52cbd573e6ec6b721c3
parent023e78bbf13c15a55013ca25641509a6697170e1
objtool,x86: Replace alternatives with .retpoline_sites

commit 134ab5bd1883312d7a4b3033b05c6b5a1bb8889b upstream.

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
[cascardo: fixed conflict because of missing
 8b946cc38e063f0f7bb67789478c38f6d7d457c9]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
[bwh: Backported to 5.10: deleted functions had slightly different code]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/vmlinux.lds.S
tools/objtool/arch/x86/decode.c
tools/objtool/check.c
tools/objtool/elf.c
tools/objtool/elf.h
tools/objtool/special.c