[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241031101853.898b866a21732350b5f02614@kernel.org>
Date: Thu, 31 Oct 2024 10:18:53 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Will Deacon <will@...nel.org>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>, Steven Rostedt
<rostedt@...dmis.org>, Florent Revest <revest@...omium.org>,
linux-trace-kernel@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>, bpf <bpf@...r.kernel.org>, Alexei
Starovoitov <ast@...nel.org>, Jiri Olsa <jolsa@...nel.org>, Alan Maguire
<alan.maguire@...cle.com>, Mark Rutland <mark.rutland@....com>,
linux-arch@...r.kernel.org, Catalin Marinas <catalin.marinas@....com>,
Huacai Chen <chenhuacai@...nel.org>, WANG Xuerui <kernel@...0n.name>,
Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Christophe Leroy <christophe.leroy@...roup.eu>, Naveen N Rao
<naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>, Paul
Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen
<dave.hansen@...ux.intel.com>, x86@...nel.org, "H. Peter Anvin"
<hpa@...or.com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [PATCH v18 01/17] fgraph: Pass ftrace_regs to entryfunc
On Mon, 28 Oct 2024 15:25:13 +0000
Will Deacon <will@...nel.org> wrote:
> On Sat, Oct 26, 2024 at 01:35:30PM +0900, Masami Hiramatsu (Google) wrote:
> > From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
> >
> > Pass ftrace_regs to the fgraph_ops::entryfunc(). If ftrace_regs is not
> > available, it passes a NULL instead. User callback function can access
> > some registers (including return address) via this ftrace_regs.
> >
> > Note that the ftrace_regs can be NULL when the arch does NOT define:
> > HAVE_DYNAMIC_FTRACE_WITH_ARGS or HAVE_DYNAMIC_FTRACE_WITH_REGS.
> > More specifically, if HAVE_DYNAMIC_FTRACE_WITH_REGS is defined but
> > not the HAVE_DYNAMIC_FTRACE_WITH_ARGS, and the ftrace ops used to
> > register the function callback does not set FTRACE_OPS_FL_SAVE_REGS.
> > In this case, ftrace_regs can be NULL in user callback.
> >
> > Signed-off-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
> > Cc: Steven Rostedt <rostedt@...dmis.org>
> > Cc: Mark Rutland <mark.rutland@....com>
> > Cc: Catalin Marinas <catalin.marinas@....com>
> > Cc: Will Deacon <will@...nel.org>
> > Cc: Huacai Chen <chenhuacai@...nel.org>
> > Cc: WANG Xuerui <kernel@...0n.name>
> > Cc: Michael Ellerman <mpe@...erman.id.au>
> > Cc: Nicholas Piggin <npiggin@...il.com>
> > Cc: Christophe Leroy <christophe.leroy@...roup.eu>
> > Cc: Naveen N Rao <naveen@...nel.org>
> > Cc: Madhavan Srinivasan <maddy@...ux.ibm.com>
> > Cc: Paul Walmsley <paul.walmsley@...ive.com>
> > Cc: Palmer Dabbelt <palmer@...belt.com>
> > Cc: Albert Ou <aou@...s.berkeley.edu>
> > Cc: Thomas Gleixner <tglx@...utronix.de>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: Borislav Petkov <bp@...en8.de>
> > Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> > Cc: x86@...nel.org
> > Cc: "H. Peter Anvin" <hpa@...or.com>
> > Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> >
> > ---
> > Changes in v18:
> > - Remove unclear comment about `regs->fp` access on arm64.
> > Changes in v16:
> > - Add a note when the ftrace_regs can be NULL.
> > - Update against for the latest kernel.
> > Changes in v11:
> > - Update for the latest for-next branch.
> > Changes in v8:
> > - Just pass ftrace_regs to the handler instead of adding a new
> > entryregfunc.
> > - Update riscv ftrace_graph_func().
> > Changes in v3:
> > - Update for new multiple fgraph.
> > ---
> > arch/arm64/kernel/ftrace.c | 15 ++++++++-
>
> For the arm64 bits:
>
> Acked-by: Will Deacon <will@...nel.org>
>
Thank you for ack for arm64!
> Will
--
Masami Hiramatsu (Google) <mhiramat@...nel.org>
Powered by blists - more mailing lists