* Ingo Molnar <[EMAIL PROTECTED]> [2007-12-15 14:12:04]:

Hi Ingo, Harvey

In file include/asm-x86/kprobes_32.h
typedef u8 kprobe_opcode_t;
hence sizeof(kprobe_opcode_t) turns out to be 1.

Hence

memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
is correct.

--
Regards
Srikar




> 
> * Harvey Harrison <[EMAIL PROTECTED]> wrote:
> 
> > If you compare this memcpy from arch_prepare_kprobe in 32/64 bit I'm 
> > almost sure the X86_32 version should be
> > 
> > ... + sizeof(kprobe_opcode_t)
> > 
> > not
> > 
> > ... * sizeof(kprobe_opcode_t)
> 
> good point. I've Cc:-ed the top authors of kprobes.c. Could anyone 
> confirm (or deny) that Harvey found a real kprobes bug here?
> 
>       Ingo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to