diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-10-30 06:32:05 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-10-30 06:32:05 +0000 |
| commit | 02c58685a4354c39fd2387a4b20e00c3f5d26096 (patch) | |
| tree | 3c9df194f59066cf56f290cfea6886eefc551a5e /sys/amd64 | |
| parent | 1c6972cf901bc9353c445d55f23bbe92d54e3dfe (diff) | |
Notes
Diffstat (limited to 'sys/amd64')
| -rw-r--r-- | sys/amd64/amd64/machdep.c | 8 | ||||
| -rw-r--r-- | sys/amd64/amd64/mem.c | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 5aa445a5290f..c96546656a32 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -501,7 +501,7 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) * if access is denied. */ if (grow_stack(p, (int)fp) == FALSE || - useracc((caddr_t)fp, sizeof(struct osigframe), B_WRITE) == FALSE) { + !useracc((caddr_t)fp, sizeof(struct osigframe), VM_PROT_WRITE)) { /* * Process has trashed its stack; give it an illegal * instruction to halt it in its tracks. @@ -648,7 +648,7 @@ sendsig(catcher, sig, mask, code) * access is denied. */ if (grow_stack(p, (int)sfp) == FALSE || - useracc((caddr_t)sfp, sizeof(struct sigframe), B_WRITE) == FALSE) { + !useracc((caddr_t)sfp, sizeof(struct sigframe), VM_PROT_WRITE)) { /* * Process has trashed its stack; give it an illegal * instruction to halt it in its tracks. @@ -769,7 +769,7 @@ osigreturn(p, uap) scp = uap->sigcntxp; - if (useracc((caddr_t)scp, sizeof (struct osigcontext), B_WRITE) == 0) + if (!useracc((caddr_t)scp, sizeof (struct osigcontext), VM_PROT_WRITE)) return(EFAULT); eflags = scp->sc_ps; @@ -880,7 +880,7 @@ sigreturn(p, uap) ucp = uap->sigcntxp; eflags = ucp->uc_mcontext.mc_eflags; - if (useracc((caddr_t)ucp, sizeof(ucontext_t), B_WRITE) == 0) + if (!useracc((caddr_t)ucp, sizeof(ucontext_t), VM_PROT_WRITE)) return(EFAULT); if (eflags & PSL_VM) { diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index 70dac4e953b9..92c7b2d07229 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -204,7 +204,8 @@ mmrw(dev, uio, flags) return EFAULT; if (!kernacc((caddr_t)(int)uio->uio_offset, c, - uio->uio_rw == UIO_READ ? B_READ : B_WRITE)) + uio->uio_rw == UIO_READ ? + VM_PROT_READ : VM_PROT_WRITE)) return (EFAULT); error = uiomove((caddr_t)(int)uio->uio_offset, (int)c, uio); continue; |
