[PATCH 0/7] objtool changes to remove most ANNOTATE_NOSPEC_ALTERNATIVE

From: Alexandre Chartre
Date: Thu Apr 02 2020 - 04:18:58 EST


Hi,

Code like retpoline or RSB stuffing, which is used to mitigate some of
the speculative execution issues, is currently ignored by objtool with
the ANNOTATE_NOSPEC_ALTERNATIVE directive. This series adds support
for intra-function calls and trampoline return instructions to objtool
so that it can handle such a code. With these changes, we can remove
most ANNOTATE_NOSPEC_ALTERNATIVE directives.

Thanks,

alex.

--

Alexandre Chartre (7):
objtool: is_fentry_call() crashes if call has no destination
objtool: Allow branches within the same alternative.
objtool: Add support for intra-function calls
objtool: Add support for return trampoline call
x86/speculation: Annotate intra-function calls
x86/speculation: Annotate retpoline return instructions
x86/speculation: Remove most ANNOTATE_NOSPEC_ALTERNATIVE

arch/x86/include/asm/nospec-branch.h | 38 ++++--
tools/objtool/check.c | 172 +++++++++++++++++++++++++--
tools/objtool/check.h | 5 +-
3 files changed, 196 insertions(+), 19 deletions(-)

--
2.18.2