Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+13
+13
tools/objtool/check.c
··· 2335 2335 static int __annotate_late(struct objtool_file *file, int type, struct instruction *insn) 2336 2336 { 2337 2337 switch (type) { 2338 + case ANNOTYPE_NOENDBR: 2339 + /* early */ 2340 + break; 2341 + 2338 2342 case ANNOTYPE_RETPOLINE_SAFE: 2339 2343 if (insn->type != INSN_JUMP_DYNAMIC && 2340 2344 insn->type != INSN_CALL_DYNAMIC && ··· 2363 2359 insn->unret = 1; 2364 2360 break; 2365 2361 2362 + case ANNOTYPE_IGNORE_ALTS: 2363 + /* early */ 2364 + break; 2365 + 2366 + case ANNOTYPE_INTRA_FUNCTION_CALL: 2367 + /* ifc */ 2368 + break; 2369 + 2366 2370 case ANNOTYPE_REACHABLE: 2367 2371 insn->dead_end = false; 2368 2372 break; 2369 2373 2370 2374 default: 2375 + WARN_INSN(insn, "Unknown annotation type: %d", type); 2371 2376 break; 2372 2377 } 2373 2378