From 04969dcf69ceadaa383279fe08a48b473a867335 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 30 May 2012 10:54:22 +0200 Subject: [PATCH] Fiasco.OC: Don't map page 0 in core (fix #223) When core requests all RAM from sigma0 it normally unmaps page 0 so that null-pointer dereferences are detected by a pagefault. The unmap syscall in the Fiasco.OC base platform was used insufficiently in this particular case. --- base-foc/src/core/platform.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base-foc/src/core/platform.cc b/base-foc/src/core/platform.cc index b32b1c13a..04fe75411 100644 --- a/base-foc/src/core/platform.cc +++ b/base-foc/src/core/platform.cc @@ -301,7 +301,8 @@ void Platform::_setup_mem_alloc() /* XXX do not allocate page0 */ if (addr == 0) { Fiasco::l4_task_unmap(Fiasco::L4_BASE_TASK_CAP, - Fiasco::l4_fpage(0, log2_size, 0), + Fiasco::l4_fpage(0, log2_size, + Fiasco::L4_FPAGE_RW), Fiasco::L4_FP_ALL_SPACES); continue; }