kprobes/x86: Do not modify singlestep buffer while resuming
authorMasami Hiramatsu <mhiramat@kernel.org>
Wed, 29 Mar 2017 05:00:25 +0000 (14:00 +0900)
committerIngo Molnar <mingo@kernel.org>
Wed, 12 Apr 2017 07:23:45 +0000 (09:23 +0200)
commit804dec5bda9b4fcdab5f67fe61db4a0498af5221
tree21c03ef2a8d261208348be56333abfb9b9d036ab
parent17880e4d5777df4770081ecf0750471cda57f86b
kprobes/x86: Do not modify singlestep buffer while resuming

Do not modify singlestep execution buffer (kprobe.ainsn.insn)
while resuming from single-stepping, instead, modifies
the buffer to add a jump back instruction at preparing
buffer.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: David S . Miller <davem@davemloft.net>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ye Xiaolong <xiaolong.ye@intel.com>
Link: http://lkml.kernel.org/r/149076361560.22469.1610155860343077495.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/kprobes/core.c