lkml.org 
[lkml]   [2004]   [Jun]   [29]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 28 Jun 2004 22:15:51 -0700 (PDT)
FromLinus Torvalds <>
SubjectRe: [RFC PATCH] x86 single-step (TF) vs system calls & traps

On Mon, 28 Jun 2004, Roland McGrath wrote:
> 
> The issue does indeed arise using sysenter, as I explained and is easily
> demonstrated by trying it.  I'm not sure what you mean here when you say,
> "by hand".  The TF trap taken in kernel mode upon sysenter entry causes the
> kernel to return using iret, which restores the TF flag in exactly the same
> way as returning from other kinds of traps, and likewise executes the
> following user-mode instruction.

They are "user-mode" only in theory.

They are really kernel instructions set up by the kernel, and user-mode 
only in the sense that yes, they run in ring3. No actual user-compiled 
code executed anywhere.

At least to me, that vsyscall trampoline is all kernel code. But yes,
you're right, we no longer do the eflags save/restore in user mode, that
was too slow (some of my first versions just cleared TF unconditionally,
and the trampoline was responsible for re-enabling it).

> Are you referring to the signal trampoline for returning from signal
> handlers?  If you are referring to some other trampoline, please clear up
> my confusion.

I was talking about the vsyscall code. 

		Linus
-
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    [from the cache]
©2003-2008