Re: [RFC PATCH] x86 single-step (TF) vs system calls & traps

From: Roland McGrath
Date: Thu Jul 01 2004 - 02:51:08 EST


> Roland, I don't think (pretty sure actually ;) we can handle the case
> where TF is set from userspace and, at the same time, the user uses
> PTRACE_SINGLESTEP.

I don't know where you pulled the notion of that case from. I certainly
never mentioned it. When I raised the case of user-mode setting of TF, I
was quite clear that it's a case when ptrace is not involved.

> The PTRACE_SINGLESTEP gives you the SYSGOOD behaviour, if you set it. And
> sends a SIGTRAP notification to the ptrace'ing parent process.

Like I said before, that is a change in the behavior. Since its inception,
SYSGOOD has meant exactly and only that when you use PTRACE_SYSCALL you
will get a different notification for a syscall-tracing stop than other
sources of SIGTRAP that may arise during execution of user code between
system calls. At no time ever before, has it been possible to get the
SIGTRAP|0x80 wait result when you had not just called PTRACE_SYSCALL.
After your change, calling PTRACE_SINGLESTEP can now produce that result.
I don't think that change is a good thing.

As the originator of the SYSGOOD option, Dan might have a comment about this.



Thanks,
Roland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/