summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/mem.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-10-30 06:32:05 +0000
committerphk <phk@FreeBSD.org>1999-10-30 06:32:05 +0000
commit8d8f53dcdc1e1126b75d084478a6ff0d4664f39d (patch)
tree3c9df194f59066cf56f290cfea6886eefc551a5e /sys/amd64/amd64/mem.c
parentad79c6009cc16320a9a1ee513845cb84a567ec52 (diff)
downloadFreeBSD-src-8d8f53dcdc1e1126b75d084478a6ff0d4664f39d.zip
FreeBSD-src-8d8f53dcdc1e1126b75d084478a6ff0d4664f39d.tar.gz
Change useracc() and kernacc() to use VM_PROT_{READ|WRITE|EXECUTE} for the
"rw" argument, rather than hijacking B_{READ|WRITE}. Fix two bugs (physio & cam) resulting by the confusion caused by this. Submitted by: Tor.Egge@fast.no Reviewed by: alc, ken (partly)
Diffstat (limited to 'sys/amd64/amd64/mem.c')
-rw-r--r--sys/amd64/amd64/mem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c
index 70dac4e..92c7b2d 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;
OpenPOWER on IntegriCloud