From 7d6689055fbed308324a80769c334a649edcab56 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 12 Aug 2019 19:33:24 +0200 Subject: 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. :^) --- Kernel/Syscall.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Kernel/Syscall.h') diff --git a/Kernel/Syscall.h b/Kernel/Syscall.h index 0451c415da..cec9a23749 100644 --- a/Kernel/Syscall.h +++ b/Kernel/Syscall.h @@ -122,7 +122,8 @@ struct timeval; __ENUMERATE_SYSCALL(dbgputstr) \ __ENUMERATE_SYSCALL(watch_file) \ __ENUMERATE_SYSCALL(share_buffer_globally) \ - __ENUMERATE_SYSCALL(set_process_icon) + __ENUMERATE_SYSCALL(set_process_icon) \ + __ENUMERATE_SYSCALL(mprotect) namespace Syscall { -- cgit v1.2.3