diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-01-24 10:38:15 +0100 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2022-02-09 09:12:32 +0100 |
commit | dd88b03ff0c84f4bcbe1419b93a4bed429fed3be (patch) | |
tree | a5f52e7116906b16f4248dccaa4dca6c75b9e0b3 /arch | |
parent | Merge tag 'arm-vmap-stacks-v6' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
download | linux-dd88b03ff0c84f4bcbe1419b93a4bed429fed3be.tar.xz linux-dd88b03ff0c84f4bcbe1419b93a4bed429fed3be.zip |
ARM: ftrace: ensure that ADR takes the Thumb bit into account
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@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/entry-ftrace.S | 2 |
1 files changed, 1 insertions, 1 deletions
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 |