mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:57:44 +00: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
7 changed files with 36 additions and 1 deletions
|
@ -145,6 +145,7 @@ public:
|
|||
void* sys$mmap(const Syscall::SC_mmap_params*);
|
||||
int sys$munmap(void*, size_t size);
|
||||
int sys$set_mmap_name(void*, size_t, const char*);
|
||||
int sys$mprotect(void*, size_t, int prot);
|
||||
int sys$select(const Syscall::SC_select_params*);
|
||||
int sys$poll(pollfd*, int nfds, int timeout);
|
||||
ssize_t sys$get_dir_entries(int fd, void*, ssize_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue