Kernel+LibC: Add MAP_RANDOMIZED flag for sys$mmap()

This can be used to request random VM placement instead of the highly
predictable regular mmap(nullptr, ...) VM allocation strategy.

It will soon be used to implement ASLR in the dynamic loader. :^)
This commit is contained in:
Andreas Kling 2021-01-28 14:55:06 +01:00
commit b6937e2560
Notes: sideshowbarker 2024-07-18 22:47:32 +09:00
5 changed files with 43 additions and 7 deletions

View file

@ -95,6 +95,7 @@ enum {
#define MAP_ANON MAP_ANONYMOUS
#define MAP_STACK 0x40
#define MAP_NORESERVE 0x80
#define MAP_RANDOMIZED 0x100
#define PROT_READ 0x1
#define PROT_WRITE 0x2