Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Feb 2000 09:15:30 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        John Polstra <jdp@polstra.com>
Cc:        alpha@freebsd.org
Subject:   Re: pcb_onfault bug on alpha?
Message-ID:  <Pine.BSF.4.21.0002230914350.77743-100000@salmon.nlsystems.com>
In-Reply-To: <XFMail.000222163419.jdp@polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0002230914350.77743-100000>