]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerSultan Alsawaf <sultan.alsawaf@canonical.com>
Wed, 24 Jul 2019 15:44:59 +0000 (09:44 -0600)
commitcdd4d985542088821ac74b1d3d26b7ad21db44cc
treea7e82cb4a27fcfc676cf758dc8c510259740b266
parent47c89b1b2c280da771871551344fd9855ae07a99
function_graph: Create function_graph_enter() to consolidate architecture code

BugLink: https://bugs.launchpad.net/bugs/1836968
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/linux/ftrace.h
kernel/trace/trace_functions_graph.c