32-bit signal contexts missing dar, dsisr, trap

Gary Byers gb at clozure.com
Fri Jul 18 07:35:14 EST 2003

On Wed, 19 Feb 2003, Peter Bergner wrote:

> Gary Byers wrote:
> > I have certain stack-like data structures that have write-protected guard
> > pages at their limits and use a SIGSEGV handler to detect writes to those
> > guard pages.  The handler can respond to a write to a guard page more
> > reliably if it knows that a DSI caused the SIGSEGV, if it knows that
> > the fault involved a write, and if it knows the address being written
> > to.  I suppose that it might be possible to reconstruct this information
> > by disassembling the instruction at the sigcontext's PC, but using the
> > dar, dsisr, and trap fields of the sigcontext seems far more reliable.
> How does the attacked patch work for you?  It does seem to clean the
> code up slightly and it matches better the behaviour seen on 64-bit apps.

Peter's patch (which basically copied the contents of all saved SPRs
in the 64-bit frame along with the GPRs) doesn't seem to have made it
into the 2.5 kernel tree (or at least doesn't appear to have been in
the fairly recent 2.5.72 ameslab BK tree.)

Was this just an accidental omission, or was there some reason not to do
this ?  (Peter's patched looked correct to me, and seemed to behave


Gary Byers
gb at clozure.com

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/

More information about the Linuxppc64-dev mailing list