[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1197919234.23402.5.camel@brick>
Date: Mon, 17 Dec 2007 11:20:34 -0800
From: Harvey Harrison <harvey.harrison@...il.com>
To: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
Maneesh Soni <maneesh@...ux.vnet.ibm.com>,
srinivasa@...ibm.com, Jim Keniston <jkenisto@...ibm.com>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Masami Hiramatsu <hiramatu@....hitachi.co.jp>,
Rusty Lynch <rusty.lynch@...el.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Keshavamurthy Anil S <anil.s.keshavamurthy@...el.com>
Subject: Re: FInal kprobes rollup patches
On Mon, 2007-12-17 at 19:52 +0530, Srikar Dronamraju wrote:
> * Ingo Molnar <mingo@...e.hu> [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.
>
OK, but this would be much clearer to adopt the X86_64 way, define
MAX_INSN_SIZE one smaller and make this line:
/* Copy original instruction plus space for 1 byte relative jump */
memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE + sizeof(kprobe_opcode_t));
See the first patch of my cleanup work that unified MAX_INSN_SIZE
and you'll see why this jumped out.
Harvey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists