Fixed incorrect x86-family protection flags.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-08-01 18:54:45 +02:00
parent 49ad293d1d
commit 2e3843ffce
1 changed files with 2 additions and 2 deletions

View File

@ -380,14 +380,14 @@ namespace Sortix
if ( prot & PROT_WRITE ) { result |= PML_USERSPACE | PML_WRITABLE; }
if ( prot & PROT_KEXEC ) { result |= 0; }
if ( prot & PROT_KREAD ) { result |= 0; }
if ( prot & PROT_KWRITE ) { result |= PML_WRITABLE; }
if ( prot & PROT_KWRITE ) { result |= 0; }
if ( prot & PROT_FORK ) { result |= PML_FORK; }
return result;
}
int PMLFlagsToProtection(addr_t flags)
{
int prot = PROT_KREAD | PROT_KEXEC;
int prot = PROT_KREAD | PROT_KWRITE | PROT_KEXEC;
bool user = flags & PML_USERSPACE;
bool write = flags & PML_WRITABLE;
if ( user ) { prot |= PROT_EXEC | PROT_READ; }