blob: ea189d88a3cc761e0239043785e00d9c6d8402f5 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Jeremy Fitzhardinged6dd61c2007-05-02 19:27:14 +02002/*
Dave Hansen62e88b12014-11-18 10:23:50 -08003 * 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 Fitzhardinged6dd61c2007-05-02 19:27:14 +02006 */
7#ifndef _ASM_GENERIC_MM_HOOKS_H
8#define _ASM_GENERIC_MM_HOOKS_H
9
10static inline void arch_dup_mmap(struct mm_struct *oldmm,
11 struct mm_struct *mm)
12{
13}
14
15static inline void arch_exit_mmap(struct mm_struct *mm)
16{
17}
18
Dave Hansen62e88b12014-11-18 10:23:50 -080019static inline void arch_unmap(struct mm_struct *mm,
20 struct vm_area_struct *vma,
21 unsigned long start, unsigned long end)
22{
23}
24
25static inline void arch_bprm_mm_init(struct mm_struct *mm,
26 struct vm_area_struct *vma)
27{
28}
29
Dave Hansen1b2ee122016-02-12 13:02:21 -080030static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
Dave Hansend61172b2016-02-12 13:02:24 -080031 bool write, bool execute, bool foreign)
Dave Hansen33a709b2016-02-12 13:02:19 -080032{
33 /* by default, allow everything */
34 return true;
35}
Jeremy Fitzhardinged6dd61c2007-05-02 19:27:14 +020036#endif /* _ASM_GENERIC_MM_HOOKS_H */