[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4766EFA8.9070907@redhat.com>
Date: Mon, 17 Dec 2007 16:52:40 -0500
From: Masami Hiramatsu <mhiramat@...hat.com>
To: Harvey Harrison <harvey.harrison@...il.com>
CC: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
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
Hi Harvey,
Harvey Harrison wrote:
> On Mon, 2007-12-17 at 16:28 -0500, Masami Hiramatsu wrote:
>> Hi Harvey,
>> If you mention about a relative jump which is inserted by
>> resume_execution(), I think you might misunderstand that relative jump.
>>
>> The size of that relative jump, which will be embedded by kprobe-booster, is
>> 5-bytes(not 1 byte). So it needs 5 bytes space.
>> And we decided not to expand MAX_INSN_SIZE when we developed the booster.
>> The reasons are:
>> - it is supplemental feature(just accelerating kprobes), if we have no space,
>> we can disable it.
>> - 5 bytes are big enough compared with 15(=MAX_INSN_SIZE)
>> - the lengths of most of instructions are less than 10 bytes.
>>
>> Additionally, MAX_INSN_SIZE is used in kernel/kprobes.c to allocate an
>> instruction buffer which will be assigned to p->ainsn.insn. Since the
>> instruction buffer size is MAX_INSN_SIZE, you can not copy instructions
>> more than MAX_INSN_SIZE.
>>
>> BTW, in my patch, I unified MAX_INSN_SIZE to bigger one(16).
>> I think it is enough for us.
>>
>
> I went with 15 in mine, I thought it made the code a little more
> readable, but I will defer if you think 16 is better. If you want me
> to send the whole series to you, let me know.
Before porting, could you tell me what differences are important
to you? We can discuss about it.
> I just sent out a series of 4 patches equivalent to your patches 1-4/6
> but based on my already unified kprobes.c/h, You may want to check your
> handling of restored registers in trampoline_probe_handler which I found
> when rebasing yours on top of my cleanups. Not sure if this is
> important, but it was a difference I found.
>
> X86_32:
> regs->cs = __KERNEL_CS | get_kernel_rpl();
>
> yours:
> regs->cs = __KERNEL_CS;
Because of kretprobe's compatibility, on x86-32 cs should be set rpl().
But get_kernel_rpl() does not exist on x86-64.
Thanks,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@...hat.com, masami.hiramatsu.pt@...achi.com
--
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