1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

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
parent d3de138d64
commit b6937e2560
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