Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Define generic no-op hooks for arch_dup_mmap, arch_exit_mmap
0004  * and arch_unmap to be included in asm-FOO/mmu_context.h for any
0005  * arch FOO which doesn't need to hook these.
0006  */
0007 #ifndef _ASM_GENERIC_MM_HOOKS_H
0008 #define _ASM_GENERIC_MM_HOOKS_H
0009 
0010 static inline int arch_dup_mmap(struct mm_struct *oldmm,
0011                 struct mm_struct *mm)
0012 {
0013     return 0;
0014 }
0015 
0016 static inline void arch_exit_mmap(struct mm_struct *mm)
0017 {
0018 }
0019 
0020 static inline void arch_unmap(struct mm_struct *mm,
0021             unsigned long start, unsigned long end)
0022 {
0023 }
0024 
0025 static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
0026         bool write, bool execute, bool foreign)
0027 {
0028     /* by default, allow everything */
0029     return true;
0030 }
0031 #endif  /* _ASM_GENERIC_MM_HOOKS_H */