diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2007-11-28 12:42:17 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2007-11-28 12:42:17 +0000 |
commit | 040d9d22870e980154873e99676385dad43c6a92 (patch) | |
tree | c4d64fab10cbac4b04057ebee11bece1ac2aba3a /extras/mini-os/arch/x86 | |
parent | c0a00d42f4a675076b96f1e8c2275717e60064bf (diff) | |
download | xen-040d9d22870e980154873e99676385dad43c6a92.tar.gz xen-040d9d22870e980154873e99676385dad43c6a92.tar.bz2 xen-040d9d22870e980154873e99676385dad43c6a92.zip |
[Mini-OS] Catch NULL dereferences
Unmap page 0 (only used early at boot) so as to catch NULL dereferences.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Diffstat (limited to 'extras/mini-os/arch/x86')
-rw-r--r-- | extras/mini-os/arch/x86/mm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extras/mini-os/arch/x86/mm.c b/extras/mini-os/arch/x86/mm.c index 8d4a8d42fb..70143b3e1a 100644 --- a/extras/mini-os/arch/x86/mm.c +++ b/extras/mini-os/arch/x86/mm.c @@ -270,6 +270,9 @@ void build_pagetable(unsigned long *start_pfn, unsigned long *max_pfn) start_address += PAGE_SIZE; } + if (HYPERVISOR_update_va_mapping(0, (pte_t) {}, UVMF_INVLPG)) + printk("Unable to unmap page 0\n"); + *start_pfn = pt_pfn; } |