projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0a00d4
)
[Mini-OS] Catch NULL dereferences
author
Keir Fraser
<keir.fraser@citrix.com>
Wed, 28 Nov 2007 12:42:17 +0000
(12:42 +0000)
committer
Keir Fraser
<keir.fraser@citrix.com>
Wed, 28 Nov 2007 12:42:17 +0000
(12:42 +0000)
Unmap page 0 (only used early at boot) so as to catch NULL dereferences.
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
extras/mini-os/arch/x86/mm.c
patch
|
blob
|
history
diff --git
a/extras/mini-os/arch/x86/mm.c
b/extras/mini-os/arch/x86/mm.c
index 8d4a8d42fba7fad95682b95b7e98130fd7593b67..70143b3e1a2168ae00ff8c1e0a445ae774f98cfb 100644
(file)
--- 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;
}