[<prev] [next>] [day] [month] [year] [list]
Message-ID: <160070707261.15536.11614995814851736978.tip-bot2@tip-bot2>
Date: Mon, 21 Sep 2020 16:51:12 -0000
From: "tip-bot2 for Julien Thierry" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Julien Thierry <jthierry@...hat.com>,
Josh Poimboeuf <jpoimboe@...hat.com>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: objtool/core] objtool: Ignore unreachable fake jumps
The following commit has been merged into the objtool/core branch of tip:
Commit-ID: fb136219f0e2b417d84e67b2a3adc1f933997d04
Gitweb: https://git.kernel.org/tip/fb136219f0e2b417d84e67b2a3adc1f933997d04
Author: Julien Thierry <jthierry@...hat.com>
AuthorDate: Tue, 15 Sep 2020 08:53:17 +01:00
Committer: Josh Poimboeuf <jpoimboe@...hat.com>
CommitterDate: Fri, 18 Sep 2020 12:04:00 -05:00
objtool: Ignore unreachable fake jumps
It is possible for alternative code to unconditionally jump out of the
alternative region. In such a case, if a fake jump is added at the end
of the alternative instructions, the fake jump will never be reached.
Since the fake jump is just a mean to make sure code validation does not
go beyond the set of alternatives, reaching it is not a requirement.
Signed-off-by: Julien Thierry <jthierry@...hat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
---
tools/objtool/check.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index fd2edab..cd7c669 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2648,6 +2648,9 @@ static bool ignore_unreachable_insn(struct instruction *insn)
!strcmp(insn->sec->name, ".altinstr_aux"))
return true;
+ if (insn->type == INSN_JUMP_UNCONDITIONAL && insn->offset == FAKE_JUMP_OFFSET)
+ return true;
+
if (!insn->func)
return false;
Powered by blists - more mailing lists