]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Fix function_graph tracer interaction with BPF trampoline
authorAlexei Starovoitov <ast@kernel.org>
Mon, 9 Dec 2019 00:01:12 +0000 (16:01 -0800)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 10 Dec 2019 18:53:59 +0000 (13:53 -0500)
commita9204ba54f97a4f6ad5ca6d40e10d135f14e4b02
tree503d0cfaaecf515dd179e6e0c6a8c0ef57f2b3cb
parent1a68403a9c43503cf57f0005743e814de25ded5c
ftrace: Fix function_graph tracer interaction with BPF trampoline

Depending on type of BPF programs served by BPF trampoline it can call original
function. In such case the trampoline will skip one stack frame while
returning. That will confuse function_graph tracer and will cause crashes with
bad RIP. Teach graph tracer to skip functions that have BPF trampoline attached.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
arch/x86/kernel/ftrace.c
include/linux/ftrace.h
kernel/trace/fgraph.c
kernel/trace/ftrace.c