]> git.baikalelectronics.ru Git - kernel.git/commit
kprobes/x86: Fix kprobes to collectly handle IP on ftrace
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Wed, 5 Sep 2012 14:31:12 +0000 (23:31 +0900)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 14 Sep 2012 02:52:09 +0000 (22:52 -0400)
commitbf40501f59e1423845aaf4d10efb60da771fe217
treea3951c4c6b585f15e02634993cde58986f848443
parent5aa5e379534fa0f4b33e35f295b51659f57f601d
kprobes/x86: Fix kprobes to collectly handle IP on ftrace

Current kprobe_ftrace_handler expects regs->ip == ip, but it is
incorrect (originally on x86-64). Actually, ftrace handler sets
regs->ip = ip + MCOUNT_INSN_SIZE.
kprobe_ftrace_handler must take care for that.

Link: http://lkml.kernel.org/r/20120905143112.10329.72069.stgit@localhost.localdomain
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
arch/x86/kernel/kprobes.c