. 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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user