Patch "objtool: is_fentry_call() crashes if call has no destination" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    objtool: is_fentry_call() crashes if call has no destination

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     objtool-is_fentry_call-crashes-if-call-has-no-destination.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 87cf61fe848ca8ddf091548671e168f52e8a718e Mon Sep 17 00:00:00 2001
From: Alexandre Chartre <alexandre.chartre@xxxxxxxxxx>
Date: Tue, 14 Apr 2020 12:36:10 +0200
Subject: objtool: is_fentry_call() crashes if call has no destination

From: Alexandre Chartre <alexandre.chartre@xxxxxxxxxx>

commit 87cf61fe848ca8ddf091548671e168f52e8a718e upstream.

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@xxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Reviewed-by: Miroslav Benes <mbenes@xxxxxxx>
Acked-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Link: https://lkml.kernel.org/r/20200414103618.12657-2-alexandre.chartre@xxxxxxxxxx
Signed-off-by: Rui Qi <qirui.001@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 tools/objtool/check.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1367,7 +1367,7 @@ static int decode_sections(struct objtoo
 
 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;


Patches currently in stable-queue which might be from alexandre.chartre@xxxxxxxxxx are

queue-5.4/x86-speculation-support-intra-function-call-validation.patch
queue-5.4/objtool-add-support-for-intra-function-calls.patch
queue-5.4/objtool-is_fentry_call-crashes-if-call-has-no-destination.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux