public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Maneesh Soni <maneesh@linux.vnet.ibm.com>,
	srinivasa@in.ibm.com, Jim Keniston <jkenisto@us.ibm.com>,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
	Masami Hiramatsu <hiramatu@sdl.hitachi.co.jp>,
	Rusty Lynch <rusty.lynch@intel.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com>
Subject: Re: FInal kprobes rollup patches
Date: Mon, 17 Dec 2007 13:36:25 -0800	[thread overview]
Message-ID: <1197927385.23402.41.camel@brick> (raw)
In-Reply-To: <4766E9FC.7050101@redhat.com>

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.

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;

Harvey


  reply	other threads:[~2007-12-17 21:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-15  8:45 FInal kprobes rollup patches Harvey Harrison
2007-12-15  8:50 ` Ingo Molnar
2007-12-15  9:04   ` Harvey Harrison
2007-12-15 13:12     ` Ingo Molnar
2007-12-17 14:12       ` Srikar Dronamraju
2007-12-17 14:13       ` Masami Hiramatsu
2007-12-17 14:30         ` Final " Ingo Molnar
2007-12-17 15:29           ` Masami Hiramatsu
2007-12-17 16:06             ` Ingo Molnar
2007-12-17 16:19               ` Masami Hiramatsu
2007-12-17 20:17               ` Harvey Harrison
2007-12-17 14:22       ` FInal " Srikar Dronamraju
2007-12-17 19:20         ` Harvey Harrison
2007-12-17 21:28           ` Masami Hiramatsu
2007-12-17 21:36             ` Harvey Harrison [this message]
2007-12-17 21:52               ` Masami Hiramatsu
2007-12-17 22:00                 ` Harvey Harrison
2007-12-17 23:14                   ` Masami Hiramatsu
2007-12-17 23:27                     ` Harvey Harrison
2007-12-17 23:56                       ` Masami Hiramatsu
2007-12-18  0:27                         ` Masami Hiramatsu
2007-12-18  2:15                           ` Harvey Harrison
2007-12-18  3:10                           ` [PATCH] x86: kprobes use stack_addr() macro Harvey Harrison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1197927385.23402.41.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=ananth@in.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=hiramatu@sdl.hitachi.co.jp \
    --cc=jkenisto@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maneesh@linux.vnet.ibm.com \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=rusty.lynch@intel.com \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=srinivasa@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox