[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200402082220.808-2-alexandre.chartre@oracle.com>
Date: Thu, 2 Apr 2020 10:22:14 +0200
From: Alexandre Chartre <alexandre.chartre@...cle.com>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org, jpoimboe@...hat.com,
peterz@...radead.org, jthierry@...hat.com, tglx@...utronix.de,
alexandre.chartre@...cle.com
Subject: [PATCH 1/7] objtool: is_fentry_call() crashes if call has no destination
Fix is_fentry_call() so that it works if a call has no destination
set (call_dest). This needs to be done in order to support intra-
function calls.
Signed-off-by: Alexandre Chartre <alexandre.chartre@...cle.com>
---
tools/objtool/check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 4768d91c6d68..708562fb89e1 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1363,7 +1363,7 @@ static int decode_sections(struct objtool_file *file)
static bool is_fentry_call(struct instruction *insn)
{
- if (insn->type == INSN_CALL &&
+ if (insn->type == INSN_CALL && insn->call_dest &&
insn->call_dest->type == STT_NOTYPE &&
!strcmp(insn->call_dest->name, "__fentry__"))
return true;
--
2.18.2
Powered by blists - more mailing lists