linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [PATCH] UML - Fix vsyscall brokenness
@ 2005-07-29 15:13 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2005-07-29 15:13 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, user-mode-linux-devel, Bodo Stroesser

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>

Index: linux-2.6.12-rc3-mm2/arch/um/os-Linux/elf_aux.c
===================================================================
--- linux-2.6.12-rc3-mm2.orig/arch/um/os-Linux/elf_aux.c	2005-07-28 12:08:54.000000000 -0400
+++ linux-2.6.12-rc3-mm2/arch/um/os-Linux/elf_aux.c	2005-07-28 18:47:31.000000000 -0400
@@ -9,9 +9,10 @@
  */
 #include <elf.h>
 #include <stddef.h>
+#include <asm/elf.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 +42,9 @@
 				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;



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-29 15:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-29 15:13 [uml-devel] [PATCH] UML - Fix vsyscall brokenness Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox