summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-ftrace.S
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-01-25 11:20:49 +0100
committerArd Biesheuvel <ardb@kernel.org>2022-02-09 09:12:33 +0100
commit953f534a7ed6b725d4f101d2949393acc9262880 (patch)
tree7df80887659d9b3f7efb288b11bec86b8c7651c7 /arch/arm/kernel/entry-ftrace.S
parent65aa7e342a988efee372e1e5fa8ed8b88fd4f949 (diff)
downloadlinux-953f534a7ed6b725d4f101d2949393acc9262880.tar.bz2
ARM: ftrace: enable HAVE_FUNCTION_GRAPH_FP_TEST
Fix the frame pointer handling in the function graph tracer entry and exit code so we can enable HAVE_FUNCTION_GRAPH_FP_TEST. Instead of using FP directly (which will have different values between the entry and exit pieces of the function graph tracer), use the value of SP at entry and exit, as we can derive the former value from the frame pointer. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'arch/arm/kernel/entry-ftrace.S')
-rw-r--r--arch/arm/kernel/entry-ftrace.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/entry-ftrace.S b/arch/arm/kernel/entry-ftrace.S
index 99720064a4c5..bbfa0954c385 100644
--- a/arch/arm/kernel/entry-ftrace.S
+++ b/arch/arm/kernel/entry-ftrace.S
@@ -247,7 +247,7 @@ ENDPROC(ftrace_graph_regs_caller)
.globl return_to_handler
return_to_handler:
stmdb sp!, {r0-r3}
- mov r0, fp @ frame pointer
+ add r0, sp, #16 @ sp at exit of instrumented routine
bl ftrace_return_to_handler
mov lr, r0 @ r0 has real ret addr
ldmia sp!, {r0-r3}