Re: [PATCH -tip v14 03/12] kprobes: checks probe address is instruction boudary on x86

2009-08-18 Thread Frederic Weisbecker
On Thu, Aug 13, 2009 at 04:34:28PM -0400, Masami Hiramatsu wrote: Ensure safeness of inserting kprobes by checking whether the specified address is at the first byte of a instruction on x86. This is done by decoding probed function from its head to the probe point. Signed-off-by: Masami

Re: [PATCH -tip v14 03/12] kprobes: checks probe address is instruction boudary on x86

2009-08-18 Thread Masami Hiramatsu
Frederic Weisbecker wrote: On Thu, Aug 13, 2009 at 04:34:28PM -0400, Masami Hiramatsu wrote: Ensure safeness of inserting kprobes by checking whether the specified address is at the first byte of a instruction on x86. This is done by decoding probed function from its head to the probe point.

Re: [PATCH -tip v14 03/12] kprobes: checks probe address is instruction boudary on x86

2009-08-18 Thread Frederic Weisbecker
On Tue, Aug 18, 2009 at 07:17:39PM -0400, Masami Hiramatsu wrote: Frederic Weisbecker wrote: + while (addr paddr) { + kernel_insn_init(insn, (void *)addr); + insn_get_opcode(insn); + + /* Check if the instruction has been modified. */ + if

Re: [PATCH -tip v14 03/12] kprobes: checks probe address is instruction boudary on x86

2009-08-18 Thread Masami Hiramatsu
Frederic Weisbecker wrote: On Tue, Aug 18, 2009 at 07:17:39PM -0400, Masami Hiramatsu wrote: Frederic Weisbecker wrote: + while (addr paddr) { + kernel_insn_init(insn, (void *)addr); + insn_get_opcode(insn); + + /* Check if the instruction has been modified. */

[PATCH -tip v14 03/12] kprobes: checks probe address is instruction boudary on x86

2009-08-13 Thread Masami Hiramatsu
Ensure safeness of inserting kprobes by checking whether the specified address is at the first byte of a instruction on x86. This is done by decoding probed function from its head to the probe point. Signed-off-by: Masami Hiramatsu mhira...@redhat.com Acked-by: Ananth N Mavinakayanahalli