diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-03-22 16:33:25 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2014-03-22 16:33:25 +0100 |
commit | 7e59fbeb2f05e1400dadbbd2d9c93d8bd2ad8178 (patch) | |
tree | 9c61a912906911acdca61908d8ed93c06a0cf2c1 /i386 | |
parent | 15af3b47e22c2c769afe5c8417c3f633baae6a6b (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index a3d9630..4b2892a 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; |