]> err.no Git - linux-2.6/blobdiff - arch/um/os-Linux/elf_aux.c
[PATCH] pci and yenta: pcibios_bus_to_resource
[linux-2.6] / arch / um / os-Linux / elf_aux.c
index f0d6060e3e57f601dd5a861e31ca7b7a87a0cf61..9416e1c299269d6f988c9f75f8e6f8ae94e41575 100644 (file)
@@ -9,8 +9,10 @@
  */
 #include <elf.h>
 #include <stddef.h>
+#include <asm/elf.h>
 #include "init.h"
 #include "elf_user.h"
+#include "mem_user.h"
 
 #if ELF_CLASS == ELFCLASS32
 typedef Elf32_auxv_t elf_auxv_t;
@@ -40,6 +42,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;