diff options
Diffstat (limited to 'arch/um/os-Linux/elf_aux.c')
| -rw-r--r-- | arch/um/os-Linux/elf_aux.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c index 5a99dd3fbed..1a365ddc4d0 100644 --- a/arch/um/os-Linux/elf_aux.c +++ b/arch/um/os-Linux/elf_aux.c @@ -9,24 +9,17 @@ */ #include <elf.h> #include <stddef.h> -#include "init.h" -#include "elf_user.h" -#include "mem_user.h" -#include <kern_constants.h> +#include <init.h> +#include <elf_user.h> +#include <mem_user.h> -/* Use the one from the kernel - the host may miss it, if having old headers. */ -#if UM_ELF_CLASS == UM_ELFCLASS32 typedef Elf32_auxv_t elf_auxv_t; -#else -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; - +extern 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 +33,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; |
