Linux Trace Kernel
 help / color / mirror / Atom feed
* [PATCH] arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL
@ 2025-01-17 12:55 Lukas Bulwahn
  2025-02-04 11:36 ` Will Deacon
  2025-02-04 13:09 ` Will Deacon
  0 siblings, 2 replies; 5+ messages in thread
From: Lukas Bulwahn @ 2025-01-17 12:55 UTC (permalink / raw)
  To: Masami Hiramatsu, Steven Rostedt, Mathieu Desnoyers,
	linux-trace-kernel
  Cc: Catalin Marinas, Will Deacon, Heiko Carstens, linux-arm-kernel,
	kernel-janitors, linux-kernel, Lukas Bulwahn

From: Lukas Bulwahn <lukas.bulwahn@redhat.com>

Commit a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
replaces the config HAVE_FUNCTION_GRAPH_RETVAL with the config
HAVE_FUNCTION_GRAPH_FREGS, and it replaces all the select commands in the
various architecture Kconfig files. In the arm64 architecture, the commit
adds the 'select HAVE_FUNCTION_GRAPH_FREGS', but misses to remove the
'select HAVE_FUNCTION_GRAPH_RETVAL', i.e., the select on the replaced
config.

Remove selecting the replaced config. No functional change, just cleanup.

Fixes: a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
---
 arch/arm64/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index fcdd0ed3eca8..940343beb3d4 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -225,7 +225,6 @@ config ARM64
 	select HAVE_FUNCTION_ERROR_INJECTION
 	select HAVE_FUNCTION_GRAPH_FREGS
 	select HAVE_FUNCTION_GRAPH_TRACER
-	select HAVE_FUNCTION_GRAPH_RETVAL
 	select HAVE_GCC_PLUGINS
 	select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && \
 		HW_PERF_EVENTS && HAVE_PERF_EVENTS_NMI
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL
  2025-01-17 12:55 [PATCH] arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL Lukas Bulwahn
@ 2025-02-04 11:36 ` Will Deacon
  2025-02-04 11:44   ` Lukas Bulwahn
  2025-02-04 13:09 ` Will Deacon
  1 sibling, 1 reply; 5+ messages in thread
From: Will Deacon @ 2025-02-04 11:36 UTC (permalink / raw)
  To: Lukas Bulwahn
  Cc: Masami Hiramatsu, Steven Rostedt, Mathieu Desnoyers,
	linux-trace-kernel, Catalin Marinas, Heiko Carstens,
	linux-arm-kernel, kernel-janitors, linux-kernel, Lukas Bulwahn

On Fri, Jan 17, 2025 at 07:55:22AM -0500, Lukas Bulwahn wrote:
> From: Lukas Bulwahn <lukas.bulwahn@redhat.com>
> 
> Commit a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
> replaces the config HAVE_FUNCTION_GRAPH_RETVAL with the config
> HAVE_FUNCTION_GRAPH_FREGS, and it replaces all the select commands in the
> various architecture Kconfig files. In the arm64 architecture, the commit
> adds the 'select HAVE_FUNCTION_GRAPH_FREGS', but misses to remove the
> 'select HAVE_FUNCTION_GRAPH_RETVAL', i.e., the select on the replaced
> config.
> 
> Remove selecting the replaced config. No functional change, just cleanup.
> 
> Fixes: a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
> ---
>  arch/arm64/Kconfig | 1 -
>  1 file changed, 1 deletion(-)

Hmm. There are still a couple of CONFIG_HAVE_FUNCTION_GRAPH_RETVAL guards
kicking around:

include/linux/ftrace.h:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL
kernel/trace/fgraph.c:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL

so it's not clear we can just remove the option from arm64 without
breaking ftrace_return_to_handler(). What am I missing?

Will

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL
  2025-02-04 11:36 ` Will Deacon
@ 2025-02-04 11:44   ` Lukas Bulwahn
  2025-02-04 12:25     ` Will Deacon
  0 siblings, 1 reply; 5+ messages in thread
From: Lukas Bulwahn @ 2025-02-04 11:44 UTC (permalink / raw)
  To: Will Deacon
  Cc: Masami Hiramatsu, Steven Rostedt, Mathieu Desnoyers,
	linux-trace-kernel, Catalin Marinas, Heiko Carstens,
	linux-arm-kernel, kernel-janitors, linux-kernel, Lukas Bulwahn

On Tue, Feb 4, 2025 at 12:36 PM Will Deacon <will@kernel.org> wrote:
>
> On Fri, Jan 17, 2025 at 07:55:22AM -0500, Lukas Bulwahn wrote:
> > From: Lukas Bulwahn <lukas.bulwahn@redhat.com>
> >
> > Commit a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
> > replaces the config HAVE_FUNCTION_GRAPH_RETVAL with the config
> > HAVE_FUNCTION_GRAPH_FREGS, and it replaces all the select commands in the
> > various architecture Kconfig files. In the arm64 architecture, the commit
> > adds the 'select HAVE_FUNCTION_GRAPH_FREGS', but misses to remove the
> > 'select HAVE_FUNCTION_GRAPH_RETVAL', i.e., the select on the replaced
> > config.
> >
> > Remove selecting the replaced config. No functional change, just cleanup.
> >
> > Fixes: a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
> > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
> > ---
> >  arch/arm64/Kconfig | 1 -
> >  1 file changed, 1 deletion(-)
>
> Hmm. There are still a couple of CONFIG_HAVE_FUNCTION_GRAPH_RETVAL guards
> kicking around:
>
> include/linux/ftrace.h:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL
> kernel/trace/fgraph.c:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL
>
> so it's not clear we can just remove the option from arm64 without
> breaking ftrace_return_to_handler(). What am I missing?
>

Will,

I believe you are looking at a tree, which did not include commit
a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs") yet.

A quick look:

$ git checkout  a3ed4157b7d8~1
HEAD is now at 41705c4262aa fgraph: Pass ftrace_regs to entryfunc
$ grep "CONFIG_HAVE_FUNCTION_GRAPH_RETVAL" . -R
./include/linux/ftrace.h:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL
./kernel/trace/fgraph.c:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL

$ git checkout  a3ed4157b7d8
Previous HEAD position was 41705c4262aa fgraph: Pass ftrace_regs to entryfunc
HEAD is now at a3ed4157b7d8 fgraph: Replace fgraph_ret_regs with ftrace_regs
$ grep "CONFIG_HAVE_FUNCTION_GRAPH_RETVAL" . -R
$

Once commit a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with
ftrace_regs") is applied, grepping for
CONFIG_HAVE_FUNCTION_GRAPH_RETVAL should not have any further use of
that config.

I was looking at linux-next at the time of writing that patch.

Lukas


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL
  2025-02-04 11:44   ` Lukas Bulwahn
@ 2025-02-04 12:25     ` Will Deacon
  0 siblings, 0 replies; 5+ messages in thread
From: Will Deacon @ 2025-02-04 12:25 UTC (permalink / raw)
  To: Lukas Bulwahn
  Cc: Masami Hiramatsu, Steven Rostedt, Mathieu Desnoyers,
	linux-trace-kernel, Catalin Marinas, Heiko Carstens,
	linux-arm-kernel, kernel-janitors, linux-kernel, Lukas Bulwahn

On Tue, Feb 04, 2025 at 12:44:25PM +0100, Lukas Bulwahn wrote:
> On Tue, Feb 4, 2025 at 12:36 PM Will Deacon <will@kernel.org> wrote:
> >
> > On Fri, Jan 17, 2025 at 07:55:22AM -0500, Lukas Bulwahn wrote:
> > > From: Lukas Bulwahn <lukas.bulwahn@redhat.com>
> > >
> > > Commit a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
> > > replaces the config HAVE_FUNCTION_GRAPH_RETVAL with the config
> > > HAVE_FUNCTION_GRAPH_FREGS, and it replaces all the select commands in the
> > > various architecture Kconfig files. In the arm64 architecture, the commit
> > > adds the 'select HAVE_FUNCTION_GRAPH_FREGS', but misses to remove the
> > > 'select HAVE_FUNCTION_GRAPH_RETVAL', i.e., the select on the replaced
> > > config.
> > >
> > > Remove selecting the replaced config. No functional change, just cleanup.
> > >
> > > Fixes: a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
> > > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
> > > ---
> > >  arch/arm64/Kconfig | 1 -
> > >  1 file changed, 1 deletion(-)
> >
> > Hmm. There are still a couple of CONFIG_HAVE_FUNCTION_GRAPH_RETVAL guards
> > kicking around:
> >
> > include/linux/ftrace.h:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL
> > kernel/trace/fgraph.c:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL
> >
> > so it's not clear we can just remove the option from arm64 without
> > breaking ftrace_return_to_handler(). What am I missing?
> >
> 
> Will,
> 
> I believe you are looking at a tree, which did not include commit
> a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs") yet.

Argh, sorry, you're completely right! I'd forgotten to fast-forward my
fixes branch to -rc1 before looking at this.

In which case, thank you for the patch :)

Will

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL
  2025-01-17 12:55 [PATCH] arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL Lukas Bulwahn
  2025-02-04 11:36 ` Will Deacon
@ 2025-02-04 13:09 ` Will Deacon
  1 sibling, 0 replies; 5+ messages in thread
From: Will Deacon @ 2025-02-04 13:09 UTC (permalink / raw)
  To: Masami Hiramatsu, Steven Rostedt, Mathieu Desnoyers,
	linux-trace-kernel, Lukas Bulwahn
  Cc: catalin.marinas, kernel-team, Will Deacon, Heiko Carstens,
	linux-arm-kernel, kernel-janitors, linux-kernel, Lukas Bulwahn

On Fri, 17 Jan 2025 07:55:22 -0500, Lukas Bulwahn wrote:
> Commit a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
> replaces the config HAVE_FUNCTION_GRAPH_RETVAL with the config
> HAVE_FUNCTION_GRAPH_FREGS, and it replaces all the select commands in the
> various architecture Kconfig files. In the arm64 architecture, the commit
> adds the 'select HAVE_FUNCTION_GRAPH_FREGS', but misses to remove the
> 'select HAVE_FUNCTION_GRAPH_RETVAL', i.e., the select on the replaced
> config.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL
      https://git.kernel.org/arm64/c/f458b2165d7a

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-02-04 13:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 12:55 [PATCH] arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL Lukas Bulwahn
2025-02-04 11:36 ` Will Deacon
2025-02-04 11:44   ` Lukas Bulwahn
2025-02-04 12:25     ` Will Deacon
2025-02-04 13:09 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox