diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2014-10-09 09:01:06 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-11-20 11:42:48 -0500 |
commit | a017784f1b236cbc42ce83b4345a667c21113481 (patch) | |
tree | 3ea28f325757811c85ebf655ca953e6eea49cc37 /Documentation/trace/ftrace.txt | |
parent | 0af26492d5f5c00a08d52e9f3f3831faead90246 (diff) |
kprobes/ftrace: Recover original IP if pre_handler doesn't change it
Recover original IP register if the pre_handler doesn't change it.
Since current kprobes doesn't expect that another ftrace handler
may change regs->ip, it sets kprobe.addr + MCOUNT_INSN_SIZE to
regs->ip and returns to ftrace.
This seems wrong behavior since kprobes can recover regs->ip
and safely pass it to another handler.
This adds code which recovers original regs->ip passed from
ftrace right before returning to ftrace, so that another ftrace
user can change regs->ip.
Link: http://lkml.kernel.org/r/20141009130106.4698.26362.stgit@kbuild-f20.novalocal
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'Documentation/trace/ftrace.txt')
0 files changed, 0 insertions, 0 deletions