1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __ASM_MMAN_H__ 3 #define __ASM_MMAN_H__ 4 5 #include <linux/fs.h> 6 #include <uapi/asm/mman.h> 7 8 /* PARISC cannot allow mdwe as it needs writable stacks */ 9 static inline bool arch_memory_deny_write_exec_supported(void) 10 { 11 return false; 12 } 13 #define arch_memory_deny_write_exec_supported arch_memory_deny_write_exec_supported 14 15 static inline unsigned long arch_calc_vm_flag_bits(struct file *file, unsigned long flags) 16 { 17 /* 18 * The stack on parisc grows upwards, so if userspace requests memory 19 * for a stack, mark it with VM_GROWSUP so that the stack expansion in 20 * the fault handler will work. 21 */ 22 if (flags & MAP_STACK) 23 return VM_GROWSUP; 24 25 return 0; 26 } 27 #define arch_calc_vm_flag_bits(file, flags) arch_calc_vm_flag_bits(file, flags) 28 29 #endif /* __ASM_MMAN_H__ */ 30