kprobes: Allow kprobes coexist with livepatch
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 25 Jul 2019 06:24:37 +0000 (15:24 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sat, 31 Aug 2019 16:19:10 +0000 (12:19 -0400)
commit0bc11ed5ab60c135aa764a62c02cd5ea68289de4
tree503be167bf756a0f32c4fbe11da3c41895697049
parentc68c9ec1c52e5bcd221eb09bc5344ad4f407b204
kprobes: Allow kprobes coexist with livepatch

Allow kprobes which do not modify regs->ip, coexist with livepatch
by dropping FTRACE_OPS_FL_IPMODIFY from ftrace_ops.

User who wants to modify regs->ip (e.g. function fault injection)
must set a dummy post_handler to its kprobes when registering.
However, if such regs->ip modifying kprobes is set on a function,
that function can not be livepatched.

Link: http://lkml.kernel.org/r/156403587671.30117.5233558741694155985.stgit@devnote2
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/kprobes.c