Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Jeremy Fitzhardinge | d6dd61c | 2007-05-02 19:27:14 +0200 | [diff] [blame] | 2 | /* |
Dave Hansen | 62e88b1 | 2014-11-18 10:23:50 -0800 | [diff] [blame] | 3 | * Define generic no-op hooks for arch_dup_mmap, arch_exit_mmap |
| 4 | * and arch_unmap to be included in asm-FOO/mmu_context.h for any |
| 5 | * arch FOO which doesn't need to hook these. |
Jeremy Fitzhardinge | d6dd61c | 2007-05-02 19:27:14 +0200 | [diff] [blame] | 6 | */ |
| 7 | #ifndef _ASM_GENERIC_MM_HOOKS_H |
| 8 | #define _ASM_GENERIC_MM_HOOKS_H |
| 9 | |
| 10 | static inline void arch_dup_mmap(struct mm_struct *oldmm, |
| 11 | struct mm_struct *mm) |
| 12 | { |
| 13 | } |
| 14 | |
| 15 | static inline void arch_exit_mmap(struct mm_struct *mm) |
| 16 | { |
| 17 | } |
| 18 | |
Dave Hansen | 62e88b1 | 2014-11-18 10:23:50 -0800 | [diff] [blame] | 19 | static inline void arch_unmap(struct mm_struct *mm, |
| 20 | struct vm_area_struct *vma, |
| 21 | unsigned long start, unsigned long end) |
| 22 | { |
| 23 | } |
| 24 | |
| 25 | static inline void arch_bprm_mm_init(struct mm_struct *mm, |
| 26 | struct vm_area_struct *vma) |
| 27 | { |
| 28 | } |
| 29 | |
Dave Hansen | 1b2ee12 | 2016-02-12 13:02:21 -0800 | [diff] [blame] | 30 | static inline bool arch_vma_access_permitted(struct vm_area_struct *vma, |
Dave Hansen | d61172b | 2016-02-12 13:02:24 -0800 | [diff] [blame] | 31 | bool write, bool execute, bool foreign) |
Dave Hansen | 33a709b | 2016-02-12 13:02:19 -0800 | [diff] [blame] | 32 | { |
| 33 | /* by default, allow everything */ |
| 34 | return true; |
| 35 | } |
Jeremy Fitzhardinge | d6dd61c | 2007-05-02 19:27:14 +0200 | [diff] [blame] | 36 | #endif /* _ASM_GENERIC_MM_HOOKS_H */ |