On 2016-10-31 at 15:55 "Ronald G. Minnich" <[email protected]> wrote:
> + pa = (uintptr_t)mmap((uint8_t *)start, size,
> + PROT_READ|PROT_WRITE|PROT_EXEC,
> + MAP_ANONYMOUS|MAP_POPULATE|MAP_FIXED, -1, 0);
Also, all of your MAP_FIXED mmaps should be asserted to be in safe
regions of the process's address space. Take a look at
kern/arch/x86/ros/mmu64.h for the diagram.
Here are the safe regions:
[MMAP_LOWEST_VA, MMAP_LD_FIXED_VA)
This is OK, but is currently part of the binary for lowmem.
You could replace lowmem() with a FIXED mmap, if you wanted.
[__procinfo.program_end, BRK_START)
This is the space I recently made available by moving sbrk()'s
region up. sbrk() does MAP_FIXED mmaps starting from BRK_START.
[undetermined, 0x00007f7fff8ff000)
This is the area below thread0's stack. I'd be careful with
this. If you don't get too close to BRK_END (like within a
TB), you should be ok. un-FIXED mmaps start from BRK_END and
grow up.
That's it. For these elf regions, I'd assert the are after program_end
and before BRK_START. o/w, you'll have a bad time.
Barret
--
You received this message because you are subscribed to the Google Groups
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.