Date: Wed, 23 Feb 2000 23:07:42 -0800 (PST) From: John Polstra <jdp@polstra.com> To: dfr@nlsystems.com Cc: alpha@freebsd.org Subject: Re: pcb_onfault bug on alpha? Message-ID: <200002240707.XAA39208@vashon.polstra.com> In-Reply-To: <Pine.BSF.4.21.0002232018480.77743-100000@salmon.nlsystems.com> References: <Pine.BSF.4.21.0002232018480.77743-100000@salmon.nlsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.BSF.4.21.0002232018480.77743-100000@salmon.nlsystems.com>,
Doug Rabson <dfr@nlsystems.com> wrote:
> This fix looks good.
I thought so too, but it gave me an instant unaligned access panic
when I ran my test case against it. Here again is the code:
LEAF(copyerr, 0)
LDGP(pv)
ldq ra, (16-8)(sp) /* restore ra. */
lda sp, 16(sp) /* kill stack frame. */
ldq t0, curproc
ldq t0, P_ADDR(t0)
stq zero, U_PCB_ONFAULT(t0) /* reset fault handler. */
ldiq v0, EFAULT /* return EFAULT. */
RET
END(copyerr)
It is dying on the "ldq t0, curproc". I have a feeling the GP
register is wrong at that point. A0 (which usually contains the
faulting address) is not equal to curproc, and it is in fact unaligned
for a 64-bit load. I noticed that the other fault handler (fusufault)
doesn't have a LDGP(pv) at its beginning. Any ideas? I'm close to
the limit of my knowledge of the Alpha register usage conventions.
> I'm trying to think what the symptom of this would be. Probably it
> would only affect a kernel mode SEGFAULT which happened after the
> copyin/out and turn an ugly panic into an uglier crash.
Agreed.
John
--
John Polstra jdp@polstra.com
John D. Polstra & Co., Inc. Seattle, Washington USA
"Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002240707.XAA39208>
