diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-11-08 13:11:39 -0500 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-11-13 09:36:49 -0500 |
commit | 562955fe6a558b9ef98ad87c470314946338cb2f (patch) | |
tree | cb76aa51c8a29ef696210e9145ff45772094ed98 /include/linux/ftrace.h | |
parent | ed9dafebce52206382de96bd5bbdff22335930f6 (diff) | |
download | linux-stable-562955fe6a558b9ef98ad87c470314946338cb2f.tar.gz linux-stable-562955fe6a558b9ef98ad87c470314946338cb2f.tar.bz2 linux-stable-562955fe6a558b9ef98ad87c470314946338cb2f.zip |
ftrace/x86: Add register_ftrace_direct() for custom trampolines
Enable x86 to allow for register_ftrace_direct(), where a custom trampoline
may be called directly from an ftrace mcount/fentry location.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r-- | include/linux/ftrace.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 8b37b8105398..2bc7bd6b8387 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -272,6 +272,12 @@ static inline struct ftrace_direct_func *ftrace_find_direct_func(unsigned long a * via ftrace (because there's other callbacks besides the * direct call), can inform the architecture's trampoline that this * routine has a direct caller, and what the caller is. + * + * For example, in x86, it returns the direct caller + * callback function via the regs->orig_ax parameter. + * Then in the ftrace trampoline, if this is set, it makes + * the return from the trampoline jump to the direct caller + * instead of going back to the function it just traced. */ static inline void arch_ftrace_set_direct_caller(struct pt_regs *regs, unsigned long addr) { } |