Re: [PATCH v18 02/17] fgraph: Replace fgraph_ret_regs with ftrace_regs

Will Deacon
2024-10-28T15:26:13Z

On Sat, Oct 26, 2024 at 01:35:46PM +0900, Masami Hiramatsu (Google) wrote:
> From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Use ftrace_regs instead of fgraph_ret_regs for tracing return value
> on function_graph tracer because of simplifying the callback interface.
>
> The CONFIG_HAVE_FUNCTION_GRAPH_RETVAL is also replaced by
> CONFIG_HAVE_FUNCTION_GRAPH_FREGS.
>
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> Acked-by: Heiko Carstens <hca@linux.ibm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Huacai Chen <chenhuacai@kernel.org>
> Cc: WANG Xuerui <kernel@xen0n.name>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Alexander Gordeev <agordeev@linux.ibm.com>
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
> Cc: Sven Schnelle <svens@linux.ibm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: x86@kernel.org
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>
> ---
> Changes in v18:
> - Use PTREGS_SIZE instead of redefining FRAME_SIZE on i386.
> Changes in v17:
> - Fixes s390 return_to_handler according to Heiko's advice.
> Changes in v16:
> - According to the recent ftrace_regs.h change, override
> ftrace_regs_get_frame_pointer() if needed.
> - s390: keep stack_frame on stack, just replace fgraph_ret_regs
> with ftrace_regs.
> Changes in v8:
> - Newly added.
> ---
> arch/arm64/Kconfig | 1 +
> arch/arm64/include/asm/ftrace.h | 23 ++++++-----------------
> arch/arm64/kernel/asm-offsets.c | 12 ------------
> arch/arm64/kernel/entry-ftrace.S | 32 ++++++++++++++++++--------------

For the arm64 bits:

Acked-by: Will Deacon <will@kernel.org>

Will