mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
Kernel+LibC+crash: Add mprotect() syscall
This patch adds the mprotect() syscall to allow changing the protection flags for memory regions. We don't do any region splitting/merging yet, so this only works on whole mmap() regions. Added a "crash -r" flag to verify that we crash when you attempt to write to read-only memory. :^)
This commit is contained in:
parent
4917445e2e
commit
7d6689055f
Notes:
sideshowbarker
2024-07-19 12:42:29 +09:00
Author: https://github.com/awesomekling
Commit: 7d6689055f
7 changed files with 36 additions and 1 deletions
|
@ -305,6 +305,8 @@ static u32 handle(RegisterDump& regs, u32 function, u32 arg1, u32 arg2, u32 arg3
|
|||
return current->process().sys$share_buffer_globally((int)arg1);
|
||||
case Syscall::SC_set_process_icon:
|
||||
return current->process().sys$set_process_icon((int)arg1);
|
||||
case Syscall::SC_mprotect:
|
||||
return current->process().sys$mprotect((void*)arg1, (size_t)arg2, (int)arg3);
|
||||
default:
|
||||
kprintf("<%u> int0x82: Unknown function %u requested {%x, %x, %x}\n", current->process().pid(), function, arg1, arg2, arg3);
|
||||
return -ENOSYS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue