From: "K.Prasad" <prasad@linux.vnet.ibm.com>
To: David Gibson <dwg@au1.ibm.com>
Cc: Michael Neuling <mikey@neuling.org>,
Benjamin Herrenschmidt <benh@au1.ibm.com>,
linuxppc-dev@ozlabs.org, paulus@samba.org,
Alan Stern <stern@rowland.harvard.edu>,
Roland McGrath <roland@redhat.com>
Subject: Re: [Patch 0/6] [Patch 0/6] PPC64-HWBKPT: Hardware Breakpoint interfaces - ver VIII
Date: Tue, 4 Aug 2009 02:23:16 +0530 [thread overview]
Message-ID: <20090803205316.GA3914@in.ibm.com> (raw)
In-Reply-To: <20090731061013.GG3950@yookeroo.seuss>
On Fri, Jul 31, 2009 at 04:10:13PM +1000, David Gibson wrote:
> On Mon, Jul 27, 2009 at 05:41:52AM +0530, K.Prasad wrote:
<edited>
> > Reasons
> > --------
> > - Signal delivery before execution of instruction requires complex workarounds
> > - One of the plausible workarounds is a two-pass hw-breakpoint handler which
> > delivers the signal after the first pass (with the breakpoints enabled).
> > In the second pass, it follows the existing semantics of
> > disable_hbp-->enable_ss-->single_step-->disable_ss-->enable_hbp.
>
> Yes, that's the only way I can see to do it.
>
> > - Possibility of nested exceptions is a problem here.
>
> Ok, why?
>
Reason as described in the para below.
> > - Proper identification of a second-pass of first exception and a new nested
> > exception is difficult. Possibility of stray exceptions due to accesses in
> > neighbouring memory regions of the breakpoint address further complicates it.
To elaborate, consider a case where a user-space address 'x' is
monitored for read or write, and the following happens (assume the
existence of the two-pass method for signal delivery).
- Instruction 'i' attempts to read/write in address 'x'
- hw-bkpt exception generated (pass I)
- Signal generated and hw-bkpt exception returns to user-space
- Signal is handled before 'i' is executed. Handler code reads/writes
data in 'x' again. Generates nested exception.
- hw-breakpoint handler code is unable to distinguish if the new
exception is from signal handler (nested) or due to second-pass (as
per design above).
Thanks,
K.Prasad
next prev parent reply other threads:[~2009-08-03 20:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-27 0:11 [Patch 0/6] [Patch 0/6] PPC64-HWBKPT: Hardware Breakpoint interfaces - ver VIII K.Prasad
2009-07-31 6:10 ` David Gibson
2009-08-03 16:14 ` Luis Machado
2009-08-03 20:53 ` K.Prasad [this message]
2009-08-05 2:08 ` David Gibson
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=20090803205316.GA3914@in.ibm.com \
--to=prasad@linux.vnet.ibm.com \
--cc=benh@au1.ibm.com \
--cc=dwg@au1.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=paulus@samba.org \
--cc=roland@redhat.com \
--cc=stern@rowland.harvard.edu \
/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 NNTP newsgroup(s).