mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-24 19:28:48 +00:00
Kernel: Implement an axallowed
mount option
Similar to `W^X` and `wxallowed`, this allows for anonymous executable mappings.
This commit is contained in:
parent
6187cf72cc
commit
5efa8e507b
Notes:
sideshowbarker
2024-07-17 09:35:47 +09:00
Author: https://github.com/timschumi
Commit: 5efa8e507b
Pull-request: https://github.com/SerenityOS/serenity/pull/13971
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/bgianfo ✅
Reviewed-by: https://github.com/kleinesfilmroellchen
Reviewed-by: https://github.com/linusg
5 changed files with 8 additions and 1 deletions
|
@ -75,7 +75,7 @@ ErrorOr<void> Process::validate_mmap_prot(int prot, bool map_stack, bool map_ano
|
|||
bool make_writable = prot & PROT_WRITE;
|
||||
bool make_executable = prot & PROT_EXEC;
|
||||
|
||||
if (map_anonymous && make_executable)
|
||||
if (map_anonymous && make_executable && !(executable()->mount_flags() & MS_AXALLOWED))
|
||||
return EINVAL;
|
||||
|
||||
if (map_stack && make_executable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue