mman.h 808 B

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