kprobes: Warn if optprobe handler tries to change execution path
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 19 Sep 2017 10:00:19 +0000 (19:00 +0900)
committerIngo Molnar <mingo@kernel.org>
Thu, 28 Sep 2017 07:23:04 +0000 (09:23 +0200)
commite863d5396146411b615231cae0c518cb2a23371c
tree5e687c4220dfce99482755fe51bfeb2102287044
parentcd52edad55fbcd8064877a77d31445b2fb4b85c3
kprobes: Warn if optprobe handler tries to change execution path

Warn if optprobe handler tries to change execution path.
As described in Documentation/kprobes.txt, with optprobe
user handler can not change instruction pointer. In that
case user must avoid optimizing the kprobes by setting
post_handler or break_handler.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E . McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/150581521955.32348.3615624715034787365.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/kprobes.c