Commit ac532565 authored by Chris Wedgwood's avatar Chris Wedgwood Committed by Linus Torvalds

[PATCH] uml: Build fix for TT w/o SKAS

This is required to get UML to build with only TT mode.
Signed-of-by: default avatarChris Wedgwood <cw@f00f.org>
Acked-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e38a834f
......@@ -202,6 +202,11 @@ __uml_setup("nosysemu", nosysemu_cmd_param,
" To make it working, you need a kernel patch for your host, too.\n"
" See http://perso.wanadoo.fr/laurent.vivier/UML/ for further information.\n");
/* Ugly hack for now... --cw */
#ifndef PTRACE_SYSEMU
#define PTRACE_SYSEMU 31
#endif
static void __init check_sysemu(void)
{
void *stack;
......@@ -211,7 +216,9 @@ static void __init check_sysemu(void)
return;
printk("Checking syscall emulation patch for ptrace...");
#ifdef CONFIG_MODE_SKAS
sysemu_supported = 0;
#endif /* CONFIG_MODE_SKAS */
pid = start_ptraced_child(&stack);
if(ptrace(PTRACE_SYSEMU, pid, 0, 0) >= 0) {
struct user_regs_struct regs;
......@@ -233,17 +240,23 @@ static void __init check_sysemu(void)
stop_ptraced_child(pid, stack, 0);
#ifdef CONFIG_MODE_SKAS
sysemu_supported = 1;
#endif /* CONFIG_MODE_SKAS */
printk("found\n");
}
else
{
stop_ptraced_child(pid, stack, 1);
#ifdef CONFIG_MODE_SKAS
sysemu_supported = 0;
#endif /* CONFIG_MODE_SKAS */
printk("missing\n");
}
#ifdef CONFIG_MODE_SKAS
set_using_sysemu(!force_sysemu_disabled);
#endif
}
void __init check_ptrace(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment