diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-03-08 16:30:53 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-03-15 10:32:46 +0100 |
commit | 7d209d13e7c3a3d60dc262f11a8ae4e6b4454d30 (patch) | |
tree | 89c6d78c5f1101bf73948acbe5cc71f5f8b09d71 /tools/objtool/include | |
parent | 96db4a988d653a7f18b518c25367f7bf238f4667 (diff) | |
download | lwn-7d209d13e7c3a3d60dc262f11a8ae4e6b4454d30.tar.gz lwn-7d209d13e7c3a3d60dc262f11a8ae4e6b4454d30.zip |
objtool: Add IBT/ENDBR decoding
Intel IBT requires the target of any indirect CALL or JMP instruction
to be the ENDBR instruction; optionally it allows those two
instructions to have a NOTRACK prefix in order to avoid this
requirement.
The kernel will not enable the use of NOTRACK, as such any occurence
of it in compiler generated code should be flagged.
Teach objtool to Decode ENDBR instructions and WARN about NOTRACK
prefixes.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20220308154319.645963517@infradead.org
Diffstat (limited to 'tools/objtool/include')
-rw-r--r-- | tools/objtool/include/objtool/arch.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/objtool/include/objtool/arch.h b/tools/objtool/include/objtool/arch.h index 76bae3078286..9b19cc304195 100644 --- a/tools/objtool/include/objtool/arch.h +++ b/tools/objtool/include/objtool/arch.h @@ -27,6 +27,7 @@ enum insn_type { INSN_STD, INSN_CLD, INSN_TRAP, + INSN_ENDBR, INSN_OTHER, }; |