summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2008-07-28 04:59:48 +0000
committeralc <alc@FreeBSD.org>2008-07-28 04:59:48 +0000
commit93ecf09bb705a27a049f0406b4a3aff1b8b2e41d (patch)
treec8eb19fb274695b0ec00391a682d615010f27383 /sys/amd64
parent4dbcd0e70fa651c0d0a0c20c215c4a254c5e2ba5 (diff)
downloadFreeBSD-src-93ecf09bb705a27a049f0406b4a3aff1b8b2e41d.zip
FreeBSD-src-93ecf09bb705a27a049f0406b4a3aff1b8b2e41d.tar.gz
Don't allow pmap_change_attr() to be applied to the recursive mapping.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index c8a7502..c72f5d3 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -4365,8 +4365,11 @@ pmap_change_attr(vm_offset_t va, vm_size_t size, int mode)
offset = va & PAGE_MASK;
size = roundup(offset + size, PAGE_SIZE);
- /* Only supported on kernel virtual addresses. */
- if (base <= VM_MAXUSER_ADDRESS)
+ /*
+ * Only supported on kernel virtual addresses, including the direct
+ * map but excluding the recursive map.
+ */
+ if (base < DMAP_MIN_ADDRESS)
return (EINVAL);
/*
OpenPOWER on IntegriCloud