]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
mm: remove arch_bprm_mm_init() hook
authorDave Hansen <dave.hansen@linux.intel.com>
Thu, 23 Jan 2020 18:41:16 +0000 (10:41 -0800)
committerDave Hansen <dave.hansen@intel.com>
Thu, 23 Jan 2020 18:41:16 +0000 (10:41 -0800)
From: Dave Hansen <dave.hansen@linux.intel.com>

MPX is being removed from the kernel due to a lack of support
in the toolchain going forward (gcc).

arch_bprm_mm_init() is used at execve() time.  The only non-stub
implementation is on x86 for MPX.  Remove the hook entirely from
all architectures and generic code.

Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: x86@kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-arch@vger.kernel.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
arch/powerpc/include/asm/mmu_context.h
arch/um/include/asm/mmu_context.h
arch/unicore32/include/asm/mmu_context.h
arch/x86/include/asm/mmu_context.h
fs/exec.c
include/asm-generic/mm_hooks.h

index 58efca934311312ed6d62b41d585be33e04f1c83..360367c579de01b4f8b1e7aa4f79c51743b5dd20 100644 (file)
@@ -238,11 +238,6 @@ static inline void arch_unmap(struct mm_struct *mm,
                mm->context.vdso_base = 0;
 }
 
-static inline void arch_bprm_mm_init(struct mm_struct *mm,
-                                    struct vm_area_struct *vma)
-{
-}
-
 #ifdef CONFIG_PPC_MEM_KEYS
 bool arch_vma_access_permitted(struct vm_area_struct *vma, bool write,
                               bool execute, bool foreign);
index 5aee0626e39042aee45122542120786a25bd725d..b4deb1bfbb687b5ac9f47eeaebf50d1267a38f6b 100644 (file)
@@ -25,11 +25,6 @@ static inline void arch_unmap(struct mm_struct *mm,
                        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)
 {
index 247a07ae2cdc3fe5f3755a21a1f45d383181f408..388c0c811c6882e057ba2af18ea22161c67b2282 100644 (file)
@@ -89,11 +89,6 @@ static inline void arch_unmap(struct mm_struct *mm,
 {
 }
 
-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)
 {
index 16ae821483c88db9905af36cc2dea34e922ab804..b7135e92e571eb4d39188e8d095544a57ee82ca0 100644 (file)
@@ -272,12 +272,6 @@ static inline bool is_64bit_mm(struct mm_struct *mm)
 }
 #endif
 
-static inline void arch_bprm_mm_init(struct mm_struct *mm,
-               struct vm_area_struct *vma)
-{
-       mpx_mm_init(mm);
-}
-
 static inline void arch_unmap(struct mm_struct *mm, unsigned long start,
                              unsigned long end)
 {
index 555e93c7dec82ae6b81db2c5402d838824e50c3c..6303057e0f13517889cf04b53958543658e5d513 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -273,7 +273,6 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
                goto err;
 
        mm->stack_vm = mm->total_vm = 1;
-       arch_bprm_mm_init(mm, vma);
        up_write(&mm->mmap_sem);
        bprm->p = vma->vm_end - sizeof(void *);
        return 0;
index 6736ed2f632bed7334704737ec1b0c06e1417d43..4dbb177d115010f36e1d0797aca1183dfb62c548 100644 (file)
@@ -22,11 +22,6 @@ static inline void arch_unmap(struct mm_struct *mm,
 {
 }
 
-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)
 {