[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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@xxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.