aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-07-29 17:03:33 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-29 18:01:14 -0400
commita502a3593c7aa2aff99a61ed71e7cb828ee4da8b (patch)
tree5960bb8522d9ce4c677233b0cdc5453bf8aef2f5 /arch
parente4c5c82024f5f292c0069cf40422b8f3bf5e684e (diff)
[PATCH] uml: fix vsyscall brokenness
The #if/#ifdef cleanup exposed a bug in UML's ELF header processing. With this bug fixed, UML recognizes the vsyscall info coming from the host. On FC4, there is a vsyscall page low in the address space, which UML doesn't provide. This causes an infinite page fault loop and a hang on boot. This patch works around that by making this look like a no-vsyscall system. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/os-Linux/elf_aux.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c
index 5423b1ca17c4..9416e1c29926 100644
--- a/arch/um/os-Linux/elf_aux.c
+++ b/arch/um/os-Linux/elf_aux.c
@@ -9,9 +9,10 @@
9 */ 9 */
10#include <elf.h> 10#include <elf.h>
11#include <stddef.h> 11#include <stddef.h>
12#include <asm/elf.h>
12#include "init.h" 13#include "init.h"
13#include "elf_user.h" 14#include "elf_user.h"
14#include <asm/elf.h> 15#include "mem_user.h"
15 16
16#if ELF_CLASS == ELFCLASS32 17#if ELF_CLASS == ELFCLASS32
17typedef Elf32_auxv_t elf_auxv_t; 18typedef Elf32_auxv_t elf_auxv_t;
@@ -41,6 +42,9 @@ __init void scan_elf_aux( char **envp)
41 break; 42 break;
42 case AT_SYSINFO_EHDR: 43 case AT_SYSINFO_EHDR:
43 vsyscall_ehdr = auxv->a_un.a_val; 44 vsyscall_ehdr = auxv->a_un.a_val;
45 /* See if the page is under TASK_SIZE */
46 if (vsyscall_ehdr < (unsigned long) envp)
47 vsyscall_ehdr = 0;
44 break; 48 break;
45 case AT_HWCAP: 49 case AT_HWCAP:
46 elf_aux_hwcap = auxv->a_un.a_val; 50 elf_aux_hwcap = auxv->a_un.a_val;