diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-12-04 14:43:42 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-12-08 19:26:50 +0100 |
commit | 1cc1e4c8aab4213bd4e6353dec2620476a233d6d (patch) | |
tree | 098107adb9d0272c25287606abad1b846b3595e3 /tools/objtool/include | |
parent | x86: Prepare inline-asm for straight-line-speculation (diff) | |
download | linux-1cc1e4c8aab4213bd4e6353dec2620476a233d6d.tar.xz linux-1cc1e4c8aab4213bd4e6353dec2620476a233d6d.zip |
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
Diffstat (limited to 'tools/objtool/include')
-rw-r--r-- | tools/objtool/include/objtool/arch.h | 1 | ||||
-rw-r--r-- | tools/objtool/include/objtool/builtin.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/objtool/include/objtool/arch.h b/tools/objtool/include/objtool/arch.h index 589ff58426ab..76bae3078286 100644 --- a/tools/objtool/include/objtool/arch.h +++ b/tools/objtool/include/objtool/arch.h @@ -26,6 +26,7 @@ enum insn_type { INSN_CLAC, INSN_STD, INSN_CLD, + INSN_TRAP, INSN_OTHER, }; diff --git a/tools/objtool/include/objtool/builtin.h b/tools/objtool/include/objtool/builtin.h index 15ac0b7d3d6a..89ba869ed08f 100644 --- a/tools/objtool/include/objtool/builtin.h +++ b/tools/objtool/include/objtool/builtin.h @@ -9,7 +9,7 @@ extern const struct option check_options[]; extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, - validate_dup, vmlinux, mcount, noinstr, backup; + validate_dup, vmlinux, mcount, noinstr, backup, sls; extern int cmd_parse_options(int argc, const char **argv, const char * const usage[]); |