mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
Kernel: Allow PROT_NONE in mmap and mprotect for stack regions
To allow for userspace guard pages (ruby uses this). Redundant since serenity creates them automatically, but should be allowed anyway.
This commit is contained in:
parent
925f21353e
commit
8924b1f532
1 changed files with 2 additions and 6 deletions
|
@ -80,12 +80,8 @@ static bool validate_mmap_prot(int prot, bool map_stack, bool map_anonymous, Mem
|
|||
if (make_writable && make_executable)
|
||||
return false;
|
||||
|
||||
if (map_stack) {
|
||||
if (make_executable)
|
||||
return false;
|
||||
if (!make_readable || !make_writable)
|
||||
return false;
|
||||
}
|
||||
if (map_stack && make_executable)
|
||||
return false;
|
||||
|
||||
if (region) {
|
||||
if (make_writable && region->has_been_executable())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue