Commit dd88b03f authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

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: a3ba87a6 ("ARM: 6316/1: ftrace: add Thumb-2 support")
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Reviewed-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 2fa39482
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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