]> err.no Git - linux-2.6/blobdiff - arch/um/os-Linux/elf_aux.c
Merge HEAD from ../scsi-misc-2.6-tmp
[linux-2.6] / arch / um / os-Linux / elf_aux.c
index 5423b1ca17c47b30115ed5c71fbcfeb5ae46ba37..4cca3e9c23fe065c3fb2c5a84464d7cd7ab44178 100644 (file)
@@ -11,7 +11,7 @@
 #include <stddef.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 +41,9 @@ __init void scan_elf_aux( char **envp)
                                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;