# From Bodo Stroesser - Change is_syscall to check for sysenter and also that # we are actually executing a system call. Index: new/arch/um/sys-i386/ptrace.c =================================================================== Signed-off-by: Paolo 'Blaisorblade' Giarrusso --- um-linux-2.4.27-paolo/arch/um/sys-i386/ptrace.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff -puN arch/um/sys-i386/ptrace.c~syscall-security-1 arch/um/sys-i386/ptrace.c --- um-linux-2.4.27/arch/um/sys-i386/ptrace.c~syscall-security-1 2005-04-15 11:13:12.000000000 +0200 +++ um-linux-2.4.27-paolo/arch/um/sys-i386/ptrace.c 2005-04-15 11:13:12.000000000 +0200 @@ -7,6 +7,7 @@ #include "asm/elf.h" #include "asm/ptrace.h" #include "asm/uaccess.h" +#include "asm/unistd.h" #include "ptrace_user.h" #include "sysdep/sigcontext.h" #include "sysdep/sc.h" @@ -23,11 +24,12 @@ int is_syscall(unsigned long addr) n = copy_from_user(&instr, (void *) addr, sizeof(instr)); if(n){ - printk("is_syscall : failed to read instruction from 0x%lu\n", + printk("is_syscall : failed to read instruction from 0x%lx\n", addr); return(0); } - return(instr == 0x80cd); + return( (instr == 0x80cd || instr == 0x340f) && + PT_REGS_EAX(¤t->thread.regs) < NR_syscalls); } /* determines which flags the user has access to. */ _