diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-14 16:22:27 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-14 16:23:35 +0200 |
commit | 5de6c7117d078528e506c7a7030ad6d6005111bd (patch) | |
tree | 60083dac8fd96dcdc01c7a8ea41a40d333531460 /i386 | |
parent | 399e0622ed0dc30a8803a0fcf2dcdb66a509e891 (diff) | |
download | gnumach-5de6c7117d078528e506c7a7030ad6d6005111bd.tar.gz gnumach-5de6c7117d078528e506c7a7030ad6d6005111bd.tar.bz2 gnumach-5de6c7117d078528e506c7a7030ad6d6005111bd.zip |
pmap: reserve last virtual page
So as to catch trying to dereference -1
Diffstat (limited to 'i386')
-rw-r--r-- | i386/intel/pmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index 934ae7f4..cba7890e 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -753,8 +753,8 @@ void pmap_bootstrap(void) kernel_virtual_end = kernel_virtual_start + VM_KERNEL_MAP_SIZE; if (kernel_virtual_end < kernel_virtual_start - || kernel_virtual_end > VM_MAX_KERNEL_ADDRESS) - kernel_virtual_end = VM_MAX_KERNEL_ADDRESS; + || kernel_virtual_end > VM_MAX_KERNEL_ADDRESS - PAGE_SIZE) + kernel_virtual_end = VM_MAX_KERNEL_ADDRESS - PAGE_SIZE; /* * Allocate and clear a kernel page directory. |