Skip to content

Commit 42222ea

Browse files
hansendcdavehansenintel
authored andcommitted
mm: remove arch_bprm_mm_init() hook
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>
1 parent aa9ccb7 commit 42222ea

6 files changed

Lines changed: 0 additions & 27 deletions

File tree

‎arch/powerpc/include/asm/mmu_context.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,6 @@ static inline void arch_unmap(struct mm_struct *mm,
238238
mm->context.vdso_base = 0;
239239
}
240240

241-
static inline void arch_bprm_mm_init(struct mm_struct *mm,
242-
struct vm_area_struct *vma)
243-
{
244-
}
245-
246241
#ifdef CONFIG_PPC_MEM_KEYS
247242
bool arch_vma_access_permitted(struct vm_area_struct *vma, bool write,
248243
bool execute, bool foreign);

‎arch/um/include/asm/mmu_context.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ static inline void arch_unmap(struct mm_struct *mm,
2525
unsigned long start, unsigned long end)
2626
{
2727
}
28-
static inline void arch_bprm_mm_init(struct mm_struct *mm,
29-
struct vm_area_struct *vma)
30-
{
31-
}
32-
3328
static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
3429
bool write, bool execute, bool foreign)
3530
{

‎arch/unicore32/include/asm/mmu_context.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ static inline void arch_unmap(struct mm_struct *mm,
8989
{
9090
}
9191

92-
static inline void arch_bprm_mm_init(struct mm_struct *mm,
93-
struct vm_area_struct *vma)
94-
{
95-
}
96-
9792
static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
9893
bool write, bool execute, bool foreign)
9994
{

‎arch/x86/include/asm/mmu_context.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,6 @@ static inline bool is_64bit_mm(struct mm_struct *mm)
272272
}
273273
#endif
274274

275-
static inline void arch_bprm_mm_init(struct mm_struct *mm,
276-
struct vm_area_struct *vma)
277-
{
278-
mpx_mm_init(mm);
279-
}
280-
281275
static inline void arch_unmap(struct mm_struct *mm, unsigned long start,
282276
unsigned long end)
283277
{

‎fs/exec.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
273273
goto err;
274274

275275
mm->stack_vm = mm->total_vm = 1;
276-
arch_bprm_mm_init(mm, vma);
277276
up_write(&mm->mmap_sem);
278277
bprm->p = vma->vm_end - sizeof(void *);
279278
return 0;

‎include/asm-generic/mm_hooks.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ static inline void arch_unmap(struct mm_struct *mm,
2222
{
2323
}
2424

25-
static inline void arch_bprm_mm_init(struct mm_struct *mm,
26-
struct vm_area_struct *vma)
27-
{
28-
}
29-
3025
static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
3126
bool write, bool execute, bool foreign)
3227
{

0 commit comments

Comments
 (0)