diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-11-18 17:10:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-05 19:32:09 +0100 |
commit | 67d7bec3fc6c129807b22d39cb12edab2420baab (patch) | |
tree | 2ab8fae046fb74e584e8a9485e6287d8c21fd41c /include | |
parent | b72fc1c3cce457d3e9753abf52fe7f1627dd1bf3 (diff) | |
download | linux-stable-67d7bec3fc6c129807b22d39cb12edab2420baab.tar.gz linux-stable-67d7bec3fc6c129807b22d39cb12edab2420baab.tar.bz2 linux-stable-67d7bec3fc6c129807b22d39cb12edab2420baab.zip |
function_graph: Create function_graph_enter() to consolidate architecture code
commit 8114865ff82e200b383e46821c25cb0625b842b5 upstream.
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: 03274a3ffb449 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ftrace.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index a397907e8d72..5717e8f81c59 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -779,6 +779,9 @@ extern void return_to_handler(void); extern int ftrace_push_return_trace(unsigned long ret, unsigned long func, int *depth, unsigned long frame_pointer, unsigned long *retp); +extern int +function_graph_enter(unsigned long ret, unsigned long func, + unsigned long frame_pointer, unsigned long *retp); unsigned long ftrace_graph_ret_addr(struct task_struct *task, int *idx, unsigned long ret, unsigned long *retp); |