]> 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)
commit3126204c2b2388e069e1041a49caaa4c2530cce5
tree0fc9886f242a9c91c3ab0d1234db71a6da2a010a
parent4d3671e39018b2d2f3d0eaa332c090af0f539935
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