Re: [PATCH v2 08/19] arm/vdso: Remove vdso pointer from mm->context

From: Christophe Leroy
Date: Tue Nov 24 2020 - 01:22:21 EST




Le 24/11/2020 à 01:29, Dmitry Safonov a écrit :
Not used any more.

But what about mremap() ? Maybe you should explain why you can remove it ?


Signed-off-by: Dmitry Safonov <dima@xxxxxxxxxx>
---
arch/arm/include/asm/mmu.h | 3 ---
arch/arm/kernel/vdso.c | 12 ------------
2 files changed, 15 deletions(-)

diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
index 1592a4264488..2397b0a19f59 100644
--- a/arch/arm/include/asm/mmu.h
+++ b/arch/arm/include/asm/mmu.h
@@ -12,9 +12,6 @@ typedef struct {
#endif
unsigned int vmalloc_seq;
unsigned long sigpage;
-#ifdef CONFIG_VDSO
- unsigned long vdso;
-#endif
#ifdef CONFIG_BINFMT_ELF_FDPIC
unsigned long exec_fdpic_loadmap;
unsigned long interp_fdpic_loadmap;
diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
index 710e5ca99a53..4b39c7d8f525 100644
--- a/arch/arm/kernel/vdso.c
+++ b/arch/arm/kernel/vdso.c
@@ -47,17 +47,8 @@ static const struct vm_special_mapping vdso_data_mapping = {
.pages = &vdso_data_page,
};
-static int vdso_mremap(const struct vm_special_mapping *sm,
- struct vm_area_struct *new_vma)
-{
- current->mm->context.vdso = new_vma->vm_start;
-
- return 0;
-}
-
static struct vm_special_mapping vdso_text_mapping __ro_after_init = {
.name = "[vdso]",
- .mremap = vdso_mremap,
};
struct elfinfo {
@@ -239,8 +230,6 @@ void arm_install_vdso(struct mm_struct *mm, unsigned long addr,
struct vm_area_struct *vma;
unsigned long len;
- mm->context.vdso = 0;
-
if (vdso_text_pagelist == NULL)
return;
@@ -258,7 +247,6 @@ void arm_install_vdso(struct mm_struct *mm, unsigned long addr,
if (IS_ERR(vma))
return;
- mm->context.vdso = addr;
*sysinfo_ehdr = addr;
}