Commit 5c176aff authored by Mark Rutland's avatar Mark Rutland Committed by Will Deacon

arm64: ftrace: enable graph FP test

The core frace code has an optional sanity check on the frame pointer
passed by ftrace_graph_caller and return_to_handler. This is cheap,
useful, and enabled unconditionally on x86, sparc, and riscv.

Let's do the same on arm64, so that we can catch any problems early.
Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Torsten Duwe <duwe@suse.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent e4fe1966
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <asm/insn.h> #include <asm/insn.h>
#define HAVE_FUNCTION_GRAPH_FP_TEST
#define MCOUNT_ADDR ((unsigned long)_mcount) #define MCOUNT_ADDR ((unsigned long)_mcount)
#define MCOUNT_INSN_SIZE AARCH64_INSN_SIZE #define MCOUNT_INSN_SIZE AARCH64_INSN_SIZE
......
...@@ -207,8 +207,7 @@ ENDPROC(ftrace_graph_caller) ...@@ -207,8 +207,7 @@ ENDPROC(ftrace_graph_caller)
* void return_to_handler(void) * void return_to_handler(void)
* *
* Run ftrace_return_to_handler() before going back to parent. * Run ftrace_return_to_handler() before going back to parent.
* @fp is checked against the value passed by ftrace_graph_caller() * @fp is checked against the value passed by ftrace_graph_caller().
* only when HAVE_FUNCTION_GRAPH_FP_TEST is enabled.
*/ */
ENTRY(return_to_handler) ENTRY(return_to_handler)
save_return_regs save_return_regs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment