From 71dd57f5e021156e86b6c545749a80a2948d31a7 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Fri, 8 Jan 2021 11:00:50 +0800 Subject: [PATCH] loader: fix kernel text section ownership The text section of the kernel should be owned by the kernel itself. Due to a typo, only the last page of the text section was being marked as owned by the text section. This marks the remainder of the section as being owned by the kernel. Signed-off-by: Sean Cross --- loader/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader/src/main.rs b/loader/src/main.rs index bcef4c52e..b0cf07c2b 100644 --- a/loader/src/main.rs +++ b/loader/src/main.rs @@ -468,7 +468,7 @@ impl ProgramDescription { self.text_offset as usize + offset, flag_defaults | FLG_X, ); - allocator.change_owner(pid as XousPid, load_offset + offset); + allocator.change_owner(pid as XousPid, load_offset + offset + rounded_data_bss); } // Map the process data section into RAM.