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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message