Linux Trace Kernel
 help / color / mirror / Atom feed
* [PATCH] parisc/ftrace: Fix function graph tracing disablement
@ 2024-10-02 21:32 Josh Poimboeuf
  2024-10-10 19:48 ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Josh Poimboeuf @ 2024-10-02 21:32 UTC (permalink / raw)
  To: James E.J. Bottomley, Helge Deller
  Cc: linux-kernel, Sven Schnelle, linux-trace-kernel, linux-parisc,
	Steven Rostedt, Masami Hiramatsu, Mark Rutland, Peter Zijlstra

Due to an apparent copy-paste bug, the parisc implementation of
ftrace_disable_ftrace_graph_caller() doesn't actually do anything.  It
enables the (already-enabled) static key rather than disabling it.

The result is that after function graph tracing has been "disabled", any
subsequent (non-graph) function tracing will inadvertently also enable
the slow fgraph return address hijacking.

Fixes: 98f2926171ae ("parisc/ftrace: use static key to enable/disable function graph tracer")
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
 arch/parisc/kernel/ftrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c
index c91f9c2e61ed..f8d08eab7db8 100644
--- a/arch/parisc/kernel/ftrace.c
+++ b/arch/parisc/kernel/ftrace.c
@@ -87,7 +87,7 @@ int ftrace_enable_ftrace_graph_caller(void)
 
 int ftrace_disable_ftrace_graph_caller(void)
 {
-	static_key_enable(&ftrace_graph_enable.key);
+	static_key_disable(&ftrace_graph_enable.key);
 	return 0;
 }
 #endif
-- 
2.46.0


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

end of thread, other threads:[~2024-10-10 20:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-02 21:32 [PATCH] parisc/ftrace: Fix function graph tracing disablement Josh Poimboeuf
2024-10-10 19:48 ` Steven Rostedt
2024-10-10 19:56   ` Josh Poimboeuf
2024-10-10 20:25     ` Helge Deller
2024-10-10 20:33       ` Steven Rostedt

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