Kernel: Mark sys$mprotect as not needing the big lock

All accesses to shared mutable data are already serialized behind the
process address space spinlock.
This commit is contained in:
Idan Horowitz 2023-04-04 14:11:38 +03:00
parent 3697214166
commit 2f79d0e8b9
2 changed files with 2 additions and 2 deletions

View file

@ -127,7 +127,7 @@ enum class NeedsBigProcessLock {
S(mknod, NeedsBigProcessLock::No) \
S(mmap, NeedsBigProcessLock::No) \
S(mount, NeedsBigProcessLock::Yes) \
S(mprotect, NeedsBigProcessLock::Yes) \
S(mprotect, NeedsBigProcessLock::No) \
S(mremap, NeedsBigProcessLock::Yes) \
S(msync, NeedsBigProcessLock::Yes) \
S(munmap, NeedsBigProcessLock::Yes) \

View file

@ -268,7 +268,7 @@ ErrorOr<FlatPtr> Process::sys$mmap(Userspace<Syscall::SC_mmap_params const*> use
ErrorOr<FlatPtr> Process::sys$mprotect(Userspace<void*> addr, size_t size, int prot)
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
VERIFY_NO_PROCESS_BIG_LOCK(this);
TRY(require_promise(Pledge::stdio));
if (prot & PROT_EXEC) {