Disable SYSEMU support when in TT mode, because of the potential security problems discovered in 2.6 - the performance benefit is not big anyway. Also, btw, add the nosysemu command param, since I need the code to disable SYSEMU and it's nice anyway to have it. Signed-off-by: Paolo 'Blaisorblade' Giarrusso --- um-linux-2.4.27-paolo/arch/um/kernel/process.c | 28 +++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff -puN arch/um/kernel/process.c~uml-disable-sysemu-when-tt-2.4 arch/um/kernel/process.c --- um-linux-2.4.27/arch/um/kernel/process.c~uml-disable-sysemu-when-tt-2.4 2005-04-15 11:13:07.000000000 +0200 +++ um-linux-2.4.27-paolo/arch/um/kernel/process.c 2005-04-15 11:13:07.000000000 +0200 @@ -200,6 +200,23 @@ static void stop_ptraced_child(int pid, panic("check_ptrace : munmap failed, errno = %d", errno); } +static int force_sysemu_disabled = 0; + +static int __init nosysemu_cmd_param(char *str, int* add) +{ + force_sysemu_disabled = 1; + return 0; +} + +__uml_setup("nosysemu", nosysemu_cmd_param, + "nosysemu\n" + " Turns off syscall emulation patch for ptrace (SYSEMU) on.\n" + " SYSEMU is a performance-patch introduced by Laurent Vivier. It changes\n" + " behaviour of ptrace() and helps reducing host context switch rate.\n" + " 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"); + + int use_sysemu = 0; void __init check_ptrace(void) @@ -255,8 +272,15 @@ void __init check_ptrace(void) stop_ptraced_child(pid, stack, 0); - printk("OK\n"); - use_sysemu = 1; + if (mode_tt) { + printk("found\nNot using SYSEMU support because we are" + " in TT mode\n"); + } else if (!force_sysemu_disabled) { + printk("found\n"); + use_sysemu = 1; + } else { + printk("found but disabled\n"); + } } else { printk("missing\n"); _