diff options
-rw-r--r-- | sys/arm/include/vmparam.h | 2 | ||||
-rw-r--r-- | sys/i386/include/vmparam.h | 4 | ||||
-rw-r--r-- | sys/vm/vm_mmap.c | 12 |
3 files changed, 0 insertions, 18 deletions
diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h index bc82fd0..d54671d 100644 --- a/sys/arm/include/vmparam.h +++ b/sys/arm/include/vmparam.h @@ -141,8 +141,6 @@ #define SGROWSIZ (128*1024) #define MAXSLP 20 -#define VM_PROT_READ_IS_EXEC - #ifdef ARM_USE_SMALL_ALLOC #define UMA_MD_SMALL_ALLOC #endif /* ARM_USE_SMALL_ALLOC */ diff --git a/sys/i386/include/vmparam.h b/sys/i386/include/vmparam.h index f114232..e5f596c 100644 --- a/sys/i386/include/vmparam.h +++ b/sys/i386/include/vmparam.h @@ -43,10 +43,6 @@ * Machine dependent constants for 386. */ -#ifndef PAE -#define VM_PROT_READ_IS_EXEC /* if you can read -- then you can exec */ -#endif - /* * Virtual memory related constants, all in bytes */ diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 2d668c4..6cc0acc 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -620,10 +620,6 @@ mprotect(td, uap) addr = (vm_offset_t) uap->addr; size = uap->len; prot = uap->prot & VM_PROT_ALL; -#if defined(VM_PROT_READ_IS_EXEC) - if (prot & VM_PROT_READ) - prot |= VM_PROT_EXECUTE; -#endif pageoff = (addr & PAGE_MASK); addr -= pageoff; @@ -1441,14 +1437,6 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, if (flags & MAP_NOCORE) docow |= MAP_DISABLE_COREDUMP; -#if defined(VM_PROT_READ_IS_EXEC) - if (prot & VM_PROT_READ) - prot |= VM_PROT_EXECUTE; - - if (maxprot & VM_PROT_READ) - maxprot |= VM_PROT_EXECUTE; -#endif - if (flags & MAP_STACK) rv = vm_map_stack(map, *addr, size, prot, maxprot, docow | MAP_STACK_GROWS_DOWN); |