From owner-freebsd-alpha Wed Feb 23 1:20:19 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by hub.freebsd.org (Postfix) with ESMTP id 9BA7D37B7FC for ; Wed, 23 Feb 2000 01:20:13 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-34.mail.demon.net with esmtp (Exim 2.12 #1) id 12NXtI-000EtR-0Y; Wed, 23 Feb 2000 09:15:28 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id JAA78560; Wed, 23 Feb 2000 09:18:21 GMT (envelope-from dfr@nlsystems.com) Date: Wed, 23 Feb 2000 09:15:30 +0000 (GMT) From: Doug Rabson To: John Polstra Cc: alpha@freebsd.org Subject: Re: pcb_onfault bug on alpha? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 22 Feb 2000, John Polstra wrote: > 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. Yes it should reset pcb_onfault. Scary. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message