Please sign in to comment.
kprobes/x86: Fix to support jprobes on ftrace-based kprobe
Fix kprobes/x86 to support jprobes on ftrace-based kprobes. Because of -mfentry support of ftrace, ftrace is now put on the beginning of function where jprobes are put. Originally ftrace-based kprobes doesn't support jprobe because it will change regs->ip and ftrace doesn't support changing IP and ftrace itself doesn't conflict jprobe. However, ftrace -mfentry support moves mcount call on the top of functions where jprobes are put. This means that jprobe always conflicts with ftrace-based kprobe and fails. This patch allows ftrace-based kprobes to support jprobes by allowing to modify regs->ip and kprobes breakpoint handler also allows to skip singlestepping because there is a ftrace call (not an original instruction). Link: http://firstname.lastname@example.org Reported-by: Fengguang Wu <email@example.com> Cc: Peter Zijlstra <firstname.lastname@example.org> Cc: Frederic Weisbecker <email@example.com> Cc: Thomas Gleixner <firstname.lastname@example.org> Cc: "H. Peter Anvin" <email@example.com> Signed-off-by: Masami Hiramatsu <firstname.lastname@example.org> Signed-off-by: Steven Rostedt <email@example.com>
- Loading branch information...
Showing with 29 additions and 16 deletions.