]> git.baikalelectronics.ru Git - kernel.git/commit
objtool: Add straight-line-speculation validation
authorPeter Zijlstra <peterz@infradead.org>
Sat, 4 Dec 2021 13:43:42 +0000 (14:43 +0100)
committerBorislav Petkov <bp@suse.de>
Wed, 8 Dec 2021 18:26:50 +0000 (19:26 +0100)
commitbd069c757eddfbbcdd5c3167651e521deead36b0
tree098107adb9d0272c25287606abad1b846b3595e3
parent980fa1b60cfb86f6a63f5981db79a6395f70e7fe
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
tools/objtool/arch/x86/decode.c
tools/objtool/builtin-check.c
tools/objtool/check.c
tools/objtool/include/objtool/arch.h
tools/objtool/include/objtool/builtin.h