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.
Showing the changes to tools/objtool/include/objtool (2 of 5 files). Show all
Unified · Split
| @@ -26,6 +26,7 @@ enum insn_type { · 25 unmodified lines | ||
| 26 | 26 | INSN_CLAC, |
| 27 | 27 | INSN_STD, |
| 28 | 28 | INSN_CLD, |
| 29 | + INSN_TRAP, | |
| 29 | 30 | INSN_OTHER, |
| 30 | 31 | }; |
| 31 | 32 | |
| @@ -9,7 +9,7 @@ · 8 unmodified lines | ||
| 9 | 9 | |
| 10 | 10 | extern const struct option check_options[]; |
| 11 | 11 | extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, |
| 12 | − validate_dup, vmlinux, mcount, noinstr, backup; | |
| 12 | + validate_dup, vmlinux, mcount, noinstr, backup, sls; | |
| 13 | 13 | |
| 14 | 14 | extern int cmd_parse_options(int argc, const char **argv, const char * const usage[]); |
| 15 | 15 | |