summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-03-22 16:33:25 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-03-22 16:33:25 +0100
commit7e59fbeb2f05e1400dadbbd2d9c93d8bd2ad8178 (patch)
tree9c61a912906911acdca61908d8ed93c06a0cf2c1 /i386
parent15af3b47e22c2c769afe5c8417c3f633baae6a6b (diff)
Fix overflow
We were filling much more than the mapwindows array, thus overwriting in at least debugger variables. * i386/intel/pmap.c (pmap_bootstrap): Make sure to limit mapwindows initialization within PMAP_NMAPWINDOWS.
Diffstat (limited to 'i386')
-rw-r--r--i386/intel/pmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index a3d96300..4b2892a7 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -780,7 +780,7 @@ void pmap_bootstrap(void)
}
for (; pte < ptable+NPTES; pte++)
{
- if (va >= kernel_virtual_end - PMAP_NMAPWINDOWS * PAGE_SIZE);
+ if (va >= kernel_virtual_end - PMAP_NMAPWINDOWS * PAGE_SIZE && va < kernel_virtual_end)
{
pmap_mapwindow_t *win = &mapwindows[atop(va - (kernel_virtual_end - PMAP_NMAPWINDOWS * PAGE_SIZE))];
win->entry = pte;