aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-04-09 04:30:06 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:45 -0400
commit5de253cc5b1f565f7aeb5bacd67bac37e943ceef (patch)
tree656d3742a361916deeb989ff8d4bdf346c1ee6ec /arch/x86
parent1a3e4ca41c5a38975023a6e8831c309d3322889c (diff)
x86 vDSO: don't map 32-bit vdso when disabled
We map a VMA for the 32-bit vDSO even when it's disabled, which is stupid. For the 32-bit kernel it's the vdso_enabled boot parameter/sysctl and for the 64-bit kernel it's the vdso32 boot parameter/syscall32 sysctl. When it's disabled, we don't pass AT_SYSINFO_EHDR so processes don't use the vDSO for anything, but we still map it. For the non-compat vDSO, this means we're always putting an extra VMA somewhere, maybe lousing up the control of the address space the user was hoping for. Honor the setting by doing nothing in arch_setup_additional_pages. [ also see: "x86 vDSO: don't use disabled vDSO for signal trampoline" ] Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/vdso/vdso32-setup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
index 348f1341e1c8..f7e78d84fc01 100644
--- a/arch/x86/vdso/vdso32-setup.c
+++ b/arch/x86/vdso/vdso32-setup.c
@@ -325,6 +325,9 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
325 int ret = 0; 325 int ret = 0;
326 bool compat; 326 bool compat;
327 327
328 if (vdso_enabled == VDSO_DISABLED)
329 return 0;
330
328 down_write(&mm->mmap_sem); 331 down_write(&mm->mmap_sem);
329 332
330 /* Test compat mode once here, in case someone 333 /* Test compat mode once here, in case someone