allocate_memory: Respect PROT_NONE
This commit is contained in:
parent
586ca19b62
commit
9454b65682
@ -33,6 +33,7 @@ Result<u64> sys_allocate_memory(Registers*, SyscallArgs args)
|
||||
int mmu_flags = MMU::User | MMU::NoExecute;
|
||||
if (flags & PROT_WRITE) mmu_flags |= MMU::ReadWrite;
|
||||
if (flags & PROT_EXEC) mmu_flags &= ~MMU::NoExecute;
|
||||
if (flags == PROT_NONE) mmu_flags = MMU::NoExecute;
|
||||
|
||||
kdbgln("allocate_memory: allocating memory at %#lx", address);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user