mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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.
This commit is contained in:
parent
9fd69f37d2
commit
f4a943617a
1 changed files with 2 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue