Blob Blame History Raw
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
Date: Wed, 23 Aug 2017 12:13:51 +0200
Subject: s390/mm: use generic mm_hooks
Git-commit: 8e58ab5c6563e3cc94029853471a36b87b4716eb
Patch-mainline: v4.14-rc1
References: bsc#1068032 CVE-2017-5754

With git commit 3446c13b268af86391d06611327006b059b8bab1
"s390/mm: four page table levels vs. fork"
s390 dropped its architecture specific version of arch_dup_mmap.

Now all functions defined by include/asm-generic/mm_hooks.h are
identical to the s390 versions. Use the generic header.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
[ Boris: take this one to fix the s390 build error:

  make -j48 -s -C /dev/shm/kbuild/linux.12772/current ARCH=s390 CROSS_COMPILE=s390x-suse-linux- clean
  kernel/fork.c:708:9: error: void value not ignored as it ought to be

caused by backporting

 c10e83f598d0 ("arch, mm: Allow arch_dup_mmap() to fail")
]
Acked-by: Borislav Petkov <bp@suse.de>
---
 arch/s390/include/asm/mmu_context.h |   27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)

--- a/arch/s390/include/asm/mmu_context.h
+++ b/arch/s390/include/asm/mmu_context.h
@@ -12,6 +12,7 @@
 #include <linux/mm_types.h>
 #include <asm/tlbflush.h>
 #include <asm/ctl_reg.h>
+#include <asm-generic/mm_hooks.h>
 
 static inline int init_new_context(struct task_struct *tsk,
 				   struct mm_struct *mm)
@@ -131,30 +132,4 @@ static inline void activate_mm(struct mm
 	set_user_asce(next);
 }
 
-static inline void arch_dup_mmap(struct mm_struct *oldmm,
-				 struct mm_struct *mm)
-{
-}
-
-static inline void arch_exit_mmap(struct mm_struct *mm)
-{
-}
-
-static inline void arch_unmap(struct mm_struct *mm,
-			struct vm_area_struct *vma,
-			unsigned long start, unsigned long end)
-{
-}
-
-static inline void arch_bprm_mm_init(struct mm_struct *mm,
-				     struct vm_area_struct *vma)
-{
-}
-
-static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
-		bool write, bool execute, bool foreign)
-{
-	/* by default, allow everything */
-	return true;
-}
 #endif /* __S390_MMU_CONTEXT_H */