ARM: ftrace: enable the graph tracer with the EABI unwinder
authorArd Biesheuvel <ardb@kernel.org>
Tue, 25 Jan 2022 14:55:24 +0000 (15:55 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 9 Feb 2022 08:13:59 +0000 (09:13 +0100)
commit41918ec82eb6f80c8b401422f27ca76c85aa0cb7
tree1bd1010a1e6e5a52d3c4ed22d768f863ce10dc6a
parent538b9265c063f081ca6b1228d242575a1db60711
ARM: ftrace: enable the graph tracer with the EABI unwinder

Enable the function graph tracer in combination with the EABI unwinder,
so that Thumb2 builds or Clang ARM builds can make use of it.

This involves using the unwinder to locate the return address of an
instrumented function on the stack, so that it can be overridden and
made to refer to the ftrace handling routines that need to be called at
function return.

Given that for these builds, it is not guaranteed that the value of the
link register is stored on the stack, fall back to the stack slot that
will be used by the ftrace exit code to restore LR in the instrumented
function's execution context.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
arch/arm/Kconfig
arch/arm/Kconfig.debug
arch/arm/include/asm/ftrace.h
arch/arm/kernel/Makefile
arch/arm/kernel/entry-ftrace.S
arch/arm/kernel/ftrace.c