Samuel Thibault
2007-Nov-27 11:23 UTC
[Xen-devel] [PATCH] [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> diff -r 26e766e0c628 extras/mini-os/arch/x86/mm.c --- a/extras/mini-os/arch/x86/mm.c Mon Nov 26 22:28:48 2007 +0000 +++ b/extras/mini-os/arch/x86/mm.c Tue Nov 27 11:20:32 2007 +0000 @@ -270,6 +270,9 @@ void build_pagetable(unsigned long *star 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; } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel