]> git.baikalelectronics.ru Git - kernel.git/commit
function_graph: Create function_graph_enter() to consolidate architecture code
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Sun, 18 Nov 2018 22:10:15 +0000 (17:10 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 26 Nov 2018 21:18:04 +0000 (16:18 -0500)
commit177edd95eebed0d24c65e4c2a296dd2c57e54790
tree88cbfcc66e0a8013ef4a4eed6141730aee75f6ee
parentf11bd5030d4f1983e167d654e8455adaea4ba160
function_graph: Create function_graph_enter() to consolidate architecture code

Currently all the architectures do basically the same thing in preparing the
function graph tracer on entry to a function. This code can be pulled into a
generic location and then this will allow the function graph tracer to be
fixed, as well as extended.

Create a new function graph helper function_graph_enter() that will call the
hook function (ftrace_graph_entry) and the shadow stack operation
(ftrace_push_return_trace), and remove the need of the architecture code to
manage the shadow stack.

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

Cc: stable@kernel.org
Fixes: 7e2f56662a145 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback")
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/ftrace.h
kernel/trace/trace_functions_graph.c