]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Add register_ftrace_direct()
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 8 Nov 2019 18:07:06 +0000 (13:07 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 13 Nov 2019 14:36:41 +0000 (09:36 -0500)
commitb7d9fc212080dcaf780120409895850e8c76f252
tree0fc9886f242a9c91c3ab0d1234db71a6da2a010a
parent2afe34918eea52431b039eaceb2432e9c1e2df05
ftrace: Add register_ftrace_direct()

Add the start of the functionality to allow other trampolines to use the
ftrace mcount/fentry/nop location. This adds two new functions:

 register_ftrace_direct() and unregister_ftrace_direct()

Both take two parameters: the first is the instruction address of where the
mcount/fentry/nop exists, and the second is the trampoline to have that
location called.

This will handle cases where ftrace is already used on that same location,
and will make it still work, where the registered direct called trampoline
will get called after all the registered ftrace callers are handled.

Currently, it will not allow for IP_MODIFY functions to be called at the
same locations, which include some kprobes and live kernel patching.

At this point, no architecture supports this. This is only the start of
implementing the framework.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/ftrace.h
kernel/trace/Kconfig
kernel/trace/ftrace.c