diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-02-25 14:51:06 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-02-25 14:51:06 +0000 |
commit | f206d3931a908de08330e6a19277b624d17c6afa (patch) | |
tree | c197bfddf26a453176849c3f9381e1e607ba7d9d /sys/powerpc | |
parent | 4af3a7a23ff67d621a71f1a73ff8ea3f892a07d9 (diff) | |
download | FreeBSD-src-f206d3931a908de08330e6a19277b624d17c6afa.zip FreeBSD-src-f206d3931a908de08330e6a19277b624d17c6afa.tar.gz |
Fix another bug involving /dev/mem and the OEA64 scratchpage. When
the scratchpage is updated, the PVO's physical address is updated as well.
This makes pmap_extract() begin returning non-zero values again, causing
the panic partially fixed in r204297. Fix this by excluding addresses
beyond virtual_end from consideration as KVA addresses, instead of allowing
addresses up to VM_MAX_KERNEL_ADDRESS.
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/powerpc/mem.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/powerpc/powerpc/mem.c b/sys/powerpc/powerpc/mem.c index d56d634..e4b70c6 100644 --- a/sys/powerpc/powerpc/mem.c +++ b/sys/powerpc/powerpc/mem.c @@ -121,8 +121,7 @@ kmem_direct_mapped: v = uio->uio_offset; else if (dev2unit(dev) == CDEV_MINOR_KMEM) { va = uio->uio_offset; - if ((va < VM_MIN_KERNEL_ADDRESS) - || (va > VM_MAX_KERNEL_ADDRESS)) + if ((va < VM_MIN_KERNEL_ADDRESS) || (va > virtual_end)) goto kmem_direct_mapped; va = trunc_page(uio->uio_offset); @@ -135,8 +134,7 @@ kmem_direct_mapped: v = uio->uio_offset; */ for (; va < eva; va += PAGE_SIZE) - if (pmap_extract(kernel_pmap, va) - == 0) + if (pmap_extract(kernel_pmap, va) == 0) return (EFAULT); prot = (uio->uio_rw == UIO_READ) |