lkml.org 
[lkml]   [2004]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] x86 single-step (TF) vs system calls & traps
> I am not the originator of PTRACE_O_TRACESYSGOOD, I just had the bad
> luck to touch it.

My apologies.

> I think reporting the system call using 0x80|SIGTRAP when you
> PTRACE_SINGLESTEP over the trap instruction makes excellent good sense.

If you are not concerned about existing users of PTRACE_O_TRACESYSGOOD
calling PTRACE_SINGLESTEP and then being confused, then I have no objection.
I consider you to be the authority on any such users there might be.

In that case, I'm happy to endorse Davide's original patch.
I will look into extending it to cover x86-64's ia32 support as well.

I still wonder if anyone has any insight into why this issue does not arise
for native x86-64's syscall/sysret. From my reading of the AMD64 manual, I
would expect it to happen there as well. That is, sysret is the instruction
that sets TF, and the manual says that the instruction after the one that
sets TF gets executed before the trap. It would be convenient if sysret
were a special case for this rule, since it makes it do what is best for the
system call case. But I haven't found a mention of that in the manual.



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

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.064 / U:2.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site