public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: bibo mao <bibo_mao@linux.intel.com>
To: prasanna@in.ibm.com
Cc: systemtap@sources.redhat.com
Subject: Re: [PATH 3/3] User space probes-single-stepping-out-of-line-take4
Date: Thu, 23 Mar 2006 01:58:00 -0000	[thread overview]
Message-ID: <4421FE59.4070009@linux.intel.com> (raw)
In-Reply-To: <20060315060648.GB20823@in.ibm.com>

Prasanna,
 > +	spin_lock_irqsave(&uprobe_lock, ucb->flags);
 > +	/* preemption is disabled, remains disabled
 > +	 * untill we single step on original instruction.
 > +	 */
 > +	preempt_disable();
when single step executing probed application instruction, local irq and 
  preempt are both disabled, I have two questions:
1) If probe point is about execv/exit, which will change VMA space of 
probed process, then what is next IP pointer after single stepping.
2) Some system call like read/wait will sleep by itself, but irq/preempt 
    are both disabled, there will be problem if application sleep.

thanks
bibo,mao

Prasanna S Panchamukhi wrote:
> This patch provides a mechanism for probe handling and
> executing the user-specified handlers.
> 
> Each userspace probe is uniquely identified by the combination of
> inode and offset, hence during registeration the inode and offset
> combination is added to uprobes hash table. Initially when
> breakpoint instruction is hit, the uprobes hash table is looked up
> for matching inode and offset. The pre_handlers are called in
> sequence if multiple probes are registered. Similar to kprobes,
> uprobes also adopts to single step out-of-line, so that probe miss in
> SMP environment can be avoided. But for userspace probes, instruction
> copied into kernel address space cannot be single stepped, hence the
> instruction must be copied to user address space. The solution is to
> find free space in the current process address space and then copy the
> original instruction and single step that instruction.
> 
> User processes use stack space to store local variables, agruments and
> return values. Normally the stack space either below or above the
> stack pointer indicates the free stack space.

      reply	other threads:[~2006-03-23  1:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-15  6:04 [PATH 1/3] User space probes-take4 Prasanna S Panchamukhi
2006-03-15  6:05 ` [PATH 2/3] User space probes-readpage-hooks-take4 Prasanna S Panchamukhi
2006-03-15  6:06   ` [PATH 3/3] User space probes-single-stepping-out-of-line-take4 Prasanna S Panchamukhi
2006-03-23  1:58     ` bibo mao [this message]

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=4421FE59.4070009@linux.intel.com \
    --to=bibo_mao@linux.intel.com \
    --cc=prasanna@in.ibm.com \
    --cc=systemtap@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).