Then here is a patch. It is against 2.2.10pre2, but I suspect it will
apply to other versions. I make no claim for its elegance, etc, but it
works for me. If anyone thinks of a better one, that would be nice.
The other arches should probably adopt similar changes. I don't know
enough about anything but Intel to do it.
--- arch/i386/kernel/ptrace.c.bak Mon Jun 7 13:37:01 1999
+++ arch/i386/kernel/ptrace.c Tue Jun 8 17:51:36 1999
@@ -675,11 +675,14 @@
return ret;
}
-asmlinkage void syscall_trace(void)
+asmlinkage void syscall_trace(int unused)
{
+ struct pt_regs *regs = (struct pt_regs *) &unused;
if ((current->flags & (PF_PTRACED|PF_TRACESYS))
!= (PF_PTRACED|PF_TRACESYS))
return;
+ if (!user_mode(regs))
+ return; /* Don't trace the kernel's syscalls */
current->exit_code = SIGTRAP;
current->state = TASK_STOPPED;
notify_parent(current, SIGCHLD);
--Nate Eldredge nate@cartsys.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/