Skip to content

Commit 9f9cc01

Browse files
jpoimboeIngo Molnar
authored andcommitted
objtool: Stop UNRET validation on UD2
In preparation for simplifying INSN_SYSCALL, make validate_unret() terminate control flow on UD2 just like validate_branch() already does. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/ce841269e7e28c8b7f32064464a9821034d724ff.1744095216.git.jpoimboe@kernel.org
1 parent fe1042b commit 9f9cc01

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/objtool/check.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3902,6 +3902,9 @@ static int validate_unret(struct objtool_file *file, struct instruction *insn)
39023902
break;
39033903
}
39043904

3905+
if (insn->dead_end)
3906+
return 0;
3907+
39053908
if (!next) {
39063909
WARN_INSN(insn, "teh end!");
39073910
return 1;

0 commit comments

Comments
 (0)