. map text (kernel's and processes') in readonly

. map kernel in non-user
 . don't map in first pages of kernel code and data
   if possible

these first pages could actually be freed but as the
kernel isn't allowed to touch them either we can't reuse
them until VM has totally taken over page table management
and kernel doesn't rely on identity mapping any more.
This commit is contained in:
Ben Gras
2008-12-18 15:35:22 +00:00
parent f0000078c3
commit 3121eec6bd
6 changed files with 25 additions and 14 deletions

View File

@@ -361,7 +361,7 @@ PUBLIC int proc_new(struct vmproc *vmp,
vmp->vm_offset = vstart;
/* page mapping flags for code */
#define TEXTFLAGS (PTF_PRESENT | PTF_USER | PTF_WRITE)
#define TEXTFLAGS (PTF_PRESENT | PTF_USER)
SANITYCHECK(SCL_DETAIL);
if(text_bytes > 0) {
if(!map_page_region(vmp, vstart, 0, text_bytes,