[xen-unstable] [Mini-OS] Catch NULL dereferences

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen-unstable] [Mini-OS] Catch NULL dereferences

Xen patchbot-unstable
# HG changeset patch
# User Keir Fraser <[hidden email]>
# Date 1196253737 0
# Node ID 3fdbdd131fc7c64cacf99e2dd9eda40ca3ed40bb
# Parent  74bd94747ca31fae0616f8ecc36b389867fb13ed
[Mini-OS] Catch NULL dereferences

Unmap page 0 (only used early at boot) so as to catch NULL dereferences.

Signed-off-by: Samuel Thibault <[hidden email]>
---
 extras/mini-os/arch/x86/mm.c |    3 +++
 1 files changed, 3 insertions(+)

diff -r 74bd94747ca3 -r 3fdbdd131fc7 extras/mini-os/arch/x86/mm.c
--- a/extras/mini-os/arch/x86/mm.c Wed Nov 28 12:41:41 2007 +0000
+++ b/extras/mini-os/arch/x86/mm.c Wed Nov 28 12:42:17 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-changelog mailing list
[hidden email]
http://lists.xensource.com/xen-changelog