[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-645a387ecbdb4aa78c8451a66416340616134537@git.kernel.org>
Date: Mon, 24 Mar 2014 10:04:27 -0700
From: tip-bot for Stefani Seibold <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, luto@...capital.net, hpa@...or.com,
mingo@...nel.org, stefani@...bold.net, tglx@...utronix.de,
hpa@...ux.intel.com
Subject: [tip:x86/vdso] x86, vdso: Fix size of get_unmapped_area()
Commit-ID: 645a387ecbdb4aa78c8451a66416340616134537
Gitweb: http://git.kernel.org/tip/645a387ecbdb4aa78c8451a66416340616134537
Author: Stefani Seibold <stefani@...bold.net>
AuthorDate: Sun, 23 Mar 2014 17:38:14 +0100
Committer: H. Peter Anvin <hpa@...ux.intel.com>
CommitDate: Mon, 24 Mar 2014 09:31:23 -0700
x86, vdso: Fix size of get_unmapped_area()
The size of the reserved memory for a 32 bit vdso must be the size of the
32 bit vDSO in pages + HPET page + VVAR page.
One page is not enough for this. Grrrr.... silly copy and paste bug,
was right in previous patch.
Signed-off-by: Stefani Seibold <stefani@...bold.net>
Cc: Andy Lutomirski <luto@...capital.net>
Link: http://lkml.kernel.org/r/1395592694-20571-1-git-send-email-stefani@seibold.net
Signed-off-by: H. Peter Anvin <hpa@...ux.intel.com>
---
arch/x86/vdso/vdso32-setup.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
index 791c1cb..0034898 100644
--- a/arch/x86/vdso/vdso32-setup.c
+++ b/arch/x86/vdso/vdso32-setup.c
@@ -165,12 +165,14 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
down_write(&mm->mmap_sem);
- addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0);
+ addr = get_unmapped_area(NULL, 0, vdso32_size + VDSO_OFFSET(VDSO_PREV_PAGES), 0, 0);
if (IS_ERR_VALUE(addr)) {
ret = addr;
goto up_fail;
}
+ addr += VDSO_OFFSET(VDSO_PREV_PAGES);
+
current->mm->context.vdso = (void *)addr;
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists