From owner-freebsd-alpha Wed Feb 23 23: 7:46 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id DFB4337B9EA for ; Wed, 23 Feb 2000 23:07:43 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id XAA28970; Wed, 23 Feb 2000 23:07:43 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id XAA39208; Wed, 23 Feb 2000 23:07:42 -0800 (PST) (envelope-from jdp@polstra.com) Date: Wed, 23 Feb 2000 23:07:42 -0800 (PST) Message-Id: <200002240707.XAA39208@vashon.polstra.com> To: dfr@nlsystems.com Subject: Re: pcb_onfault bug on alpha? In-Reply-To: References: Organization: Polstra & Co., Seattle, WA Cc: alpha@freebsd.org Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In article , Doug Rabson 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