Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Feb 2000 16:34:19 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        alpha@freebsd.org
Subject:   pcb_onfault bug on alpha?
Message-ID:  <XFMail.000222163419.jdp@polstra.com>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.000222163419.jdp>