Patch "ARM: ftrace: ensure that ADR takes the Thumb bit into account" has been added to the 5.17-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

    ARM: ftrace: ensure that ADR takes the Thumb bit into account

to the 5.17-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:
     arm-ftrace-ensure-that-adr-takes-the-thumb-bit-into-.patch
and it can be found in the queue-5.17 subdirectory.

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



commit 496cae1d6982fb276f10c53b4823c6429b72163b
Author: Ard Biesheuvel <ardb@xxxxxxxxxx>
Date:   Mon Jan 24 10:38:15 2022 +0100

    ARM: ftrace: ensure that ADR takes the Thumb bit into account
    
    [ Upstream commit dd88b03ff0c84f4bcbe1419b93a4bed429fed3be ]
    
    Using ADR to take the address of 'ftrace_stub' via a local label
    produces an address that has the Thumb bit cleared, which means the
    subsequent comparison is guaranteed to fail. Instead, use the badr
    macro, which forces the Thumb bit to be set.
    
    Fixes: a3ba87a61499 ("ARM: 6316/1: ftrace: add Thumb-2 support")
    Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
    Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
    Reviewed-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
    Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm/kernel/entry-ftrace.S b/arch/arm/kernel/entry-ftrace.S
index a74289ebc803..f4886fb6e9ba 100644
--- a/arch/arm/kernel/entry-ftrace.S
+++ b/arch/arm/kernel/entry-ftrace.S
@@ -40,7 +40,7 @@
 	mcount_enter
 	ldr	r0, =ftrace_trace_function
 	ldr	r2, [r0]
-	adr	r0, .Lftrace_stub
+	badr	r0, .Lftrace_stub
 	cmp	r0, r2
 	bne	1f
 



[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