summaryrefslogtreecommitdiff
path: root/tools/objtool/check.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2024-11-28 10:39:07 +0100
committerPeter Zijlstra <peterz@infradead.org>2024-12-02 12:01:45 +0100
commite7e0eb53c2f0f68fe2577472ce2802a4efd9d7ce (patch)
treec25c140920a1b74715b217e5f668b72cd97d9f78 /tools/objtool/check.c
parent87116ae6da034242baf06e799f9f0e2a8ee6a796 (diff)
objtool: Warn about unknown annotation types
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> Link: https://lore.kernel.org/r/20241128094312.611961175@infradead.org
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r--tools/objtool/check.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 26bdd3ebf5d2..bfb407f3ac96 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2335,6 +2335,10 @@ static int __annotate_ifc(struct objtool_file *file, int type, struct instructio
static int __annotate_late(struct objtool_file *file, int type, struct instruction *insn)
{
switch (type) {
+ case ANNOTYPE_NOENDBR:
+ /* early */
+ break;
+
case ANNOTYPE_RETPOLINE_SAFE:
if (insn->type != INSN_JUMP_DYNAMIC &&
insn->type != INSN_CALL_DYNAMIC &&
@@ -2359,11 +2363,20 @@ static int __annotate_late(struct objtool_file *file, int type, struct instructi
insn->unret = 1;
break;
+ case ANNOTYPE_IGNORE_ALTS:
+ /* early */
+ break;
+
+ case ANNOTYPE_INTRA_FUNCTION_CALL:
+ /* ifc */
+ break;
+
case ANNOTYPE_REACHABLE:
insn->dead_end = false;
break;
default:
+ WARN_INSN(insn, "Unknown annotation type: %d", type);
break;
}