On Thu, Jul 28, 2005 at 08:24:36PM +0200, Blaisorblade wrote:
> - if ( ! __kernel_vsyscall || ! vsyscall_ehdr ||
> - ! elf_aux_hwcap || ! elf_aux_platform ||
> - ! page_size || (vsyscall_ehdr % page_size) ) {
>
> + if ( ! __kernel_vsyscall || ! vsyscall_ehdr ||
> + ! elf_aux_hwcap || ! elf_aux_platform ||
> + ! page_size || (vsyscall_ehdr % page_size) || (vsyscall_ehdr <
> TASK_SIZE) {
This is what I ended up with:
Index: linux-2.6.12-rc3-mm2/arch/um/os-Linux/elf_aux.c
===================================================================
--- linux-2.6.12-rc3-mm2.orig/arch/um/os-Linux/elf_aux.c 2005-07-28
12:08:54.000000000 -0400
+++ linux-2.6.12-rc3-mm2/arch/um/os-Linux/elf_aux.c 2005-07-28
18:47:31.000000000 -0400
@@ -9,9 +9,10 @@
*/
#include <elf.h>
#include <stddef.h>
+#include <asm/elf.h>
#include "init.h"
#include "elf_user.h"
-#include <asm/elf.h>
+#include "mem_user.h"
#if ELF_CLASS == ELFCLASS32
typedef Elf32_auxv_t elf_auxv_t;
@@ -41,6 +42,9 @@
break;
case AT_SYSINFO_EHDR:
vsyscall_ehdr = auxv->a_un.a_val;
+ /* See if the page is under TASK_SIZE */
+ if (vsyscall_ehdr < (unsigned long) envp)
+ vsyscall_ehdr = 0;
break;
case AT_HWCAP:
elf_aux_hwcap = auxv->a_un.a_val;
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user