]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/um/os-Linux/elf_aux.c
Merge branch 'linux-2.6' into for-2.6.24
[linux-2.6-omap-h63xx.git] / arch / um / os-Linux / elf_aux.c
index ab33cb3c74ec26e5ba282067cb701a741cfab5ca..608784d4ec57e73f0d74a1e0ea3223c89db58cea 100644 (file)
@@ -12,7 +12,7 @@
 #include "init.h"
 #include "elf_user.h"
 #include "mem_user.h"
-#include <kernel-offsets.h>
+#include <kern_constants.h>
 
 /* Use the one from the kernel - the host may miss it, if having old headers. */
 #if UM_ELF_CLASS == UM_ELFCLASS32
@@ -21,12 +21,11 @@ typedef Elf32_auxv_t elf_auxv_t;
 typedef Elf64_auxv_t elf_auxv_t;
 #endif
 
+/* These are initialized very early in boot and never changed */
 char * elf_aux_platform;
 long elf_aux_hwcap;
-
 unsigned long vsyscall_ehdr;
 unsigned long vsyscall_end;
-
 unsigned long __kernel_vsyscall;
 
 __init void scan_elf_aux( char **envp)
@@ -40,6 +39,9 @@ __init void scan_elf_aux( char **envp)
                switch ( auxv->a_type ) {
                        case AT_SYSINFO:
                                __kernel_vsyscall = auxv->a_un.a_val;
+                               /* See if the page is under TASK_SIZE */
+                               if (__kernel_vsyscall < (unsigned long) envp)
+                                       __kernel_vsyscall = 0;
                                break;
                        case AT_SYSINFO_EHDR:
                                vsyscall_ehdr = auxv->a_un.a_val;