From e7828bbd5e8b7c8d6480d1eb744af821989ca432 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Wed, 12 Jan 2011 09:55:24 +0100 Subject: [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 Signed-off-by: Martin Schwidefsky --- arch/s390/kernel/vdso.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch/s390/kernel') 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) if (!uses_interp) return 0; - vdso_base = mm->mmap_base; #ifdef CONFIG_64BIT vdso_pagelist = vdso64_pagelist; vdso_pages = vdso64_pages; @@ -233,8 +232,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) * fail and end up putting it elsewhere. */ down_write(&mm->mmap_sem); - vdso_base = get_unmapped_area(NULL, vdso_base, - vdso_pages << PAGE_SHIFT, 0, 0); + vdso_base = get_unmapped_area(NULL, 0, vdso_pages << PAGE_SHIFT, 0, 0); if (IS_ERR_VALUE(vdso_base)) { rc = vdso_base; goto out_up; -- cgit v1.2.3