linux/arch/um
Renzo Davoli 86d6f2bf61 UML on UML fixed: it did not start
It is currently impossible to run a user-mode linux machine inside another
user-mode linux (UML on UML).  It breaks after a few instructions.  When
it tries to check whether SYSEMU is installed (the inner) UML receives an
inconsistent result (from the outer UML).

This is the output of a broken attempt:
$ ./linux mem=256m ubd0=cow
Locating the bottom of the address space ... 0x0
Locating the top of the address space ... 0xc0000000
Core dump limits :
        soft - 0
        hard - NONE
Checking that ptrace can change system call numbers...OK
Checking ptrace new tags for syscall emulation...unsupported
Checking syscall emulation patch for ptrace...check_sysemu : expected SIGTRAP, got status = 256
$

The problem is the following:

PTRACE_SYSCALL/SINGLESTEP is currently managed inside arch_ptrace for ARCH=um.

PTRACE_SYSEMU/SUSEMU_SINGLESTEP is not captured in arch_ptrace's switch,
therefore it is erroneously passed back to ptrace_request (in
kernel/ptrace).

This simple patch simply forces ptrace to return an error on
PTRACE_SYSEMU/SUSEMU_SINGLESTEP as it is unsupported on ARCH=um, and fixes
the problem.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Renzo Davoli <renzo@cs.unibo.it>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-12 16:20:23 -07:00
..
drivers uml: fix vde network backend in user mode linux 2009-02-20 17:57:48 -08:00
include uml got broken by commit 30742d5c22 2009-01-05 17:41:45 -08:00
kernel UML on UML fixed: it did not start 2009-03-12 16:20:23 -07:00
os-Linux um: Kill directly reference of netdev->priv 2008-12-04 15:07:33 -08:00
scripts
sys-i386 x86, um: get rid of excessive includes of uml-config.h 2008-10-22 22:55:22 -07:00
sys-ia64 x86, um: get rid of sysdep symlink 2008-10-22 22:55:21 -07:00
sys-ppc x86, um: get rid of header symlinks 2008-10-22 22:55:22 -07:00
sys-x86_64 x86: Fix ASM_X86__ header guards 2008-10-22 22:55:23 -07:00
Kconfig.char sound: make OSS sound core optional 2008-08-29 10:06:21 +02:00
Kconfig.common x86, um: get rid of arch/um/Kconfig.arch 2008-10-22 22:55:23 -07:00
Kconfig.debug
Kconfig.net
Kconfig.rest x86, um: get rid of arch/um/Kconfig.arch 2008-10-22 22:55:23 -07:00
Kconfig.um x86, um: get rid of arch/um/Kconfig.arch 2008-10-22 22:55:23 -07:00
Kconfig.x86 x86, um: get rid of arch/um/Kconfig.arch 2008-10-22 22:55:23 -07:00
Makefile get rid of the last symlink in uml build 2009-01-05 17:41:45 -08:00
Makefile-i386
Makefile-ia64
Makefile-os-Linux x86, um: get rid of arch/um/os symlink 2008-10-22 22:55:22 -07:00
Makefile-ppc
Makefile-skas
Makefile-x86_64
defconfig