Date: Thu, 30 Sep 1999 16:28:34 -0500 From: Alan Cox <alc@cs.rice.edu> To: John Polstra <jdp@polstra.com> Cc: Alan Cox <alc@cs.rice.edu>, current@freebsd.org Subject: Re: Now that sigcontext is gone ... Message-ID: <19990930162834.C20978@nonpc.cs.rice.edu> In-Reply-To: <XFMail.990930134022.jdp@polstra.com>; from John Polstra on Thu, Sep 30, 1999 at 01:40:22PM -0700 References: <19990930151137.H19202@cs.rice.edu> <XFMail.990930134022.jdp@polstra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 30, 1999 at 01:40:22PM -0700, John Polstra wrote: > > Yep, I have fixed that in the PM3 release (which is the one that's > actively maintained these days), but probably not in the SRC release > on which our port is based. I have ports for PM3 in the wings, > but I'm waiting for some necessary changes to <bsd.port.mk> to be > committed. > My recollection is that sc_err got added to sigcontext when VM86 support was added. I'm not sure that sc_err was ever documented to contain the faulting address either. It only gets the faulting address by historical accident/hack, specifically, from trap_pfault: } /* kludge to pass faulting virtual address to sendsig */ frame->tf_err = eva; return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV); } Up until this point, frame->tf_err tells me details about the page fault, such as whether it was a read or a write access. I'd really like that information to make it out to user-level in addition to the faulting address. In other words, we should find another way to pass the faulting address to sendsig than by overwriting frame->tf_err. The siginfo si_addr field is the proper place for the faulting address to wind up anyway. Alan P.S. This also reminds me that FreeBSD is non-standard relative to Linux and all of the major vender commercial Unices in that a disallowed access, such as a write to a read-only region of memory, generates a SIGBUS rather than a SIGSEGV. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990930162834.C20978>