linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [for-next][PATCH 09/18] powerpc/function_graph: Simplify with function_graph_entry()
       [not found] <20181122002801.501220343@goodmis.org>
@ 2018-11-22  0:28 ` Steven Rostedt
  2018-11-23  7:30   ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2018-11-22  0:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arch, Peter Zijlstra, Frederic Weisbecker, linuxppc-dev,
	stable, Thomas Gleixner, Masami Hiramatsu, Andy Lutomirski,
	Josh Poimboeuf, Joel Fernandes, Paul Mackerras, Andrew Morton,
	Linus Torvalds, Ingo Molnar

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

The function_graph_entry() function does the work of calling the function
graph hook function and the management of the shadow stack, simplifying the
work done in the architecture dependent prepare_ftrace_return().

Have powerpc use the new code, and remove the shadow stack management as well as
having to set up the trace structure.

This is needed to prepare for a fix of a design bug on how the curr_ret_stack
is used.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: stable@kernel.org
Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 arch/powerpc/kernel/trace/ftrace.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/trace/ftrace.c
index 4bf051d3e21e..b65c8a34ad6e 100644
--- a/arch/powerpc/kernel/trace/ftrace.c
+++ b/arch/powerpc/kernel/trace/ftrace.c
@@ -950,7 +950,6 @@ int ftrace_disable_ftrace_graph_caller(void)
  */
 unsigned long prepare_ftrace_return(unsigned long parent, unsigned long ip)
 {
-	struct ftrace_graph_ent trace;
 	unsigned long return_hooker;
 
 	if (unlikely(ftrace_graph_is_dead()))
@@ -961,18 +960,8 @@ unsigned long prepare_ftrace_return(unsigned long parent, unsigned long ip)
 
 	return_hooker = ppc_function_entry(return_to_handler);
 
-	trace.func = ip;
-	trace.depth = current->curr_ret_stack + 1;
-
-	/* Only trace if the calling function expects to */
-	if (!ftrace_graph_entry(&trace))
-		goto out;
-
-	if (ftrace_push_return_trace(parent, ip, &trace.depth, 0,
-				     NULL) == -EBUSY)
-		goto out;
-
-	parent = return_hooker;
+	if (!function_graph_enter(parent, ip, 0, NULL))
+		parent = return_hooker;
 out:
 	return parent;
 }
-- 
2.19.1



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

* Re: [for-next][PATCH 09/18] powerpc/function_graph: Simplify with function_graph_entry()
  2018-11-22  0:28 ` [for-next][PATCH 09/18] powerpc/function_graph: Simplify with function_graph_entry() Steven Rostedt
@ 2018-11-23  7:30   ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2018-11-23  7:30 UTC (permalink / raw)
  To: Sasha Levin, Steven Rostedt, Steven Rostedt (VMware), linux-kernel
  Cc: , linuxppc-dev, stable, Paul Mackerras, Linus Torvalds, stable

Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 03274a3ffb44 tracing/fgraph: Adjust fgraph depth before calling trace return callback.

The bot has tested the following trees: v4.19.3, v4.14.82, v4.9.138, v4.4.164, v3.18.126.

v4.19.3: Build OK!
v4.14.82: Build OK!
v4.9.138: Failed to apply! Possible dependencies:
    Unable to calculate

v4.4.164: Failed to apply! Possible dependencies:
    Unable to calculate

v3.18.126: Failed to apply! Possible dependencies:
    Unable to calculate


How should we proceed with this patch?

--
Thanks,
Sasha

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

end of thread, other threads:[~2018-11-23  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20181122002801.501220343@goodmis.org>
2018-11-22  0:28 ` [for-next][PATCH 09/18] powerpc/function_graph: Simplify with function_graph_entry() Steven Rostedt
2018-11-23  7:30   ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).