linux/arch
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
..
alpha cpumask: Use cpu_*_mask accessors code: alpha 2009-02-16 17:32:00 +10:30
arm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-03-09 09:15:40 -07:00
avr32 [ARM] 5400/1: Add support for inverted rdy_busy pin for Atmel nand device controller 2009-02-16 21:40:39 +00:00
blackfin Blackfin arch: SPI_MMC is now mainlined MMC_SPI 2009-03-06 00:27:57 +08:00
cris Merge branch 'syscalls' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2009-01-14 19:58:40 -08:00
frv FRV: in_interrupt() requires #inclusion of linux/hardirq.h not asm/hardirq.h now 2009-02-09 08:51:35 -08:00
h8300 Merge branch 'syscalls' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2009-01-14 19:58:40 -08:00
ia64 [IA64] fix PCI DMA flag propagation on SN (Altix) with PICs 2009-03-06 10:41:13 -08:00
m32r eeprom: More consistent symbol names 2009-01-26 21:19:57 +01:00
m68k m68k: atari - Rename "mfp" to "st_mfp" 2009-02-22 09:23:02 -08:00
m68knommu m68knommu: m528x build fix 2009-03-10 15:55:12 -07:00
mips MIPS: IP27: Enable RAID5 module 2009-03-11 21:11:07 +01:00
mn10300 mn10300: fix typo && -> || in arch/mn10300/unit-asb2305/pci.c 2009-02-20 17:57:48 -08:00
parisc Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
powerpc Merge commit 'gcl/merge' into merge 2009-03-11 10:40:29 +11:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2009-03-03 17:05:08 -08:00
sh sh: Add media/soc_camera.h to board setup of Renesas AP325RXA 2009-03-10 15:20:54 +09:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2009-03-12 09:27:53 -07:00
um UML on UML fixed: it did not start 2009-03-12 16:20:23 -07:00
x86 x86: work around Fedora-11 x86-32 kernel failures on Intel Atom CPUs 2009-03-11 18:22:03 +01:00
xtensa xtensa: fix compilation somewhat 2009-03-10 15:55:10 -07:00
.gitignore arch: Ignore arch/i386 and arch/x86_64 2008-01-19 21:29:39 -08:00
Kconfig [CVE-2009-0029] System call wrapper infrastructure 2009-01-14 14:15:16 +01:00