mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
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
This commit is contained in:
parent
87116ae6da
commit
e7e0eb53c2
@ -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)
|
static int __annotate_late(struct objtool_file *file, int type, struct instruction *insn)
|
||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
case ANNOTYPE_NOENDBR:
|
||||||
|
/* early */
|
||||||
|
break;
|
||||||
|
|
||||||
case ANNOTYPE_RETPOLINE_SAFE:
|
case ANNOTYPE_RETPOLINE_SAFE:
|
||||||
if (insn->type != INSN_JUMP_DYNAMIC &&
|
if (insn->type != INSN_JUMP_DYNAMIC &&
|
||||||
insn->type != INSN_CALL_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;
|
insn->unret = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ANNOTYPE_IGNORE_ALTS:
|
||||||
|
/* early */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ANNOTYPE_INTRA_FUNCTION_CALL:
|
||||||
|
/* ifc */
|
||||||
|
break;
|
||||||
|
|
||||||
case ANNOTYPE_REACHABLE:
|
case ANNOTYPE_REACHABLE:
|
||||||
insn->dead_end = false;
|
insn->dead_end = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
WARN_INSN(insn, "Unknown annotation type: %d", type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user