aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2011-01-12 03:55:24 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-01-12 03:55:24 -0500
commite7828bbd5e8b7c8d6480d1eb744af821989ca432 (patch)
tree58ba7676eda0b3eaa30884327047bd77e2c3a553 /arch/s390
parent9e78a13bfb1640c058fde9dabfd386b942539018 (diff)
[S390] vdso: dont map at mmap_base
The vdso object is currently always mapped with mm->mmap_base used as requested address. In case of flexible mmap layout this means it gets mapped above mmap_base and therefore potentially stealing a bit of address space that is reserved for the stack. In case of flexible mmap layout the object should be mapped below mmap base. For legacy mmap layout above. To fix this just don't request any specific address and let the mmap code figure out an address that fits. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/vdso.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index e3150dd2fe74..f438d74dedbd 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -203,7 +203,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
203 if (!uses_interp) 203 if (!uses_interp)
204 return 0; 204 return 0;
205 205
206 vdso_base = mm->mmap_base;
207#ifdef CONFIG_64BIT 206#ifdef CONFIG_64BIT
208 vdso_pagelist = vdso64_pagelist; 207 vdso_pagelist = vdso64_pagelist;
209 vdso_pages = vdso64_pages; 208 vdso_pages = vdso64_pages;
@@ -233,8 +232,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
233 * fail and end up putting it elsewhere. 232 * fail and end up putting it elsewhere.
234 */ 233 */
235 down_write(&mm->mmap_sem); 234 down_write(&mm->mmap_sem);
236 vdso_base = get_unmapped_area(NULL, vdso_base, 235 vdso_base = get_unmapped_area(NULL, 0, vdso_pages << PAGE_SHIFT, 0, 0);
237 vdso_pages << PAGE_SHIFT, 0, 0);
238 if (IS_ERR_VALUE(vdso_base)) { 236 if (IS_ERR_VALUE(vdso_base)) {
239 rc = vdso_base; 237 rc = vdso_base;
240 goto out_up; 238 goto out_up;