From owner-freebsd-alpha Tue Feb 22 16:34:29 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 22C0137B818 for ; Tue, 22 Feb 2000 16:34:22 -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 QAA22810 for ; Tue, 22 Feb 2000 16:34:20 -0800 (PST) (envelope-from jdp@polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id QAA36921 for alpha@freebsd.org; Tue, 22 Feb 2000 16:34:19 -0800 (PST) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Tue, 22 Feb 2000 16:34:19 -0800 (PST) Organization: Polstra & Co., Inc. From: John Polstra To: alpha@freebsd.org Subject: pcb_onfault bug on alpha? Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I think I might have found a bug in the fault handling for copyin and copyout on the alpha. In sys/alpha/alpha/support.s, the "pcb_onfault" member of the PCB is set in order to catch protection and page-not-present violations and arrange for the invoking system call to return EFAULT. This variable is set to either "fusufault" or "copyerr". The code for "fusufault" looks like this: LEAF(fusufault, 0) ldq t0, curproc ldq t0, P_ADDR(t0) stq zero, U_PCB_ONFAULT(t0) ldiq v0, -1 RET END(fusufault) The code for "copyerr" looks like this: LEAF(copyerr, 0) LDGP(pv) ldq ra, (16-8)(sp) /* restore ra. */ lda sp, 16(sp) /* kill stack frame. */ ldiq v0, EFAULT /* return EFAULT. */ RET END(copyerr) Why doesn't copyerr reset "pcb_onfault" to 0? I think it should. John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message