objtool: Add straight-line-speculation validation
Teach objtool to validate the straight-line-speculation constraints: - speculation trap after indirect calls - speculation trap after RET Notable: when an instruction is annotated RETPOLINE_SAFE, indicating speculation isn't a problem, also don't care about sls for that instruction. Signed-off-by:Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by:
Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20211204134908.023037659@infradead.org
Showing
- tools/objtool/arch/x86/decode.c 9 additions, 4 deletionstools/objtool/arch/x86/decode.c
- tools/objtool/builtin-check.c 2 additions, 1 deletiontools/objtool/builtin-check.c
- tools/objtool/check.c 14 additions, 0 deletionstools/objtool/check.c
- tools/objtool/include/objtool/arch.h 1 addition, 0 deletionstools/objtool/include/objtool/arch.h
- tools/objtool/include/objtool/builtin.h 1 addition, 1 deletiontools/objtool/include/objtool/builtin.h
Please register or sign in to comment