diff options
| author | Josh Poimboeuf <jpoimboe@kernel.org> | 2025-04-08 10:02:15 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-02 08:50:59 +0300 |
| commit | 18082da6ce0ef03adc76982ae0d7fb54e5bdb818 (patch) | |
| tree | 5cf20373aaf1a55924e65efb838b04c8d37145f8 /tools/objtool | |
| parent | 0cf5fd802452b41c9ac3e96abcb80d12af2d82b6 (diff) | |
| download | linux-18082da6ce0ef03adc76982ae0d7fb54e5bdb818.tar.xz | |
objtool: Stop UNRET validation on UD2
[ Upstream commit 9f9cc012c2cbac4833746a0182e06a8eec940d19 ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/objtool')
| -rw-r--r-- | tools/objtool/check.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index eb6d7025ee49..6d35fe0e4695 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -3949,6 +3949,9 @@ static int validate_unret(struct objtool_file *file, struct instruction *insn) break; } + if (insn->dead_end) + return 0; + if (!next) { WARN_INSN(insn, "teh end!"); return -1; |
