From 93ecf09bb705a27a049f0406b4a3aff1b8b2e41d Mon Sep 17 00:00:00 2001 From: alc Date: Mon, 28 Jul 2008 04:59:48 +0000 Subject: Don't allow pmap_change_attr() to be applied to the recursive mapping. --- sys/amd64/amd64/pmap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/amd64') 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); /* -- cgit v1.1