UML: build fix for .config w/o CONFIG_MODE_SKAS
PATCH 1/1 UML: build fix for .config w/o CONFIG_MODE_SKAS
This is a hacky (ie. fix properly) changes to make things build w/o CONFIG_MODE_SKAS. I think it's probably acceptable as-is for now since a good chunk of that code will probably change in the not too far off future anyhow.
Signed-off-by [email protected]
arch/um/kernel/process.c +13 -0
@@ -202,6 +202,11 @@" 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... */ +#ifndef PTRACE_SYSEMU +#define PTRACE_SYSEMU 31 +#endif +static void __init check_sysemu (void ) {void *stack;
@@ -211,7 +216,9 @@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 @@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 )