lkml.org 
[lkml]   [2003]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PPC32: cancel syscall restart on signal delivery

On Fri, 14 Nov 2003, Linus Torvalds wrote:
>
> On x86, for the old calling conventions (ie "int 0x80"), that meant that
> the interrupt window was literally a single instruction. For the new one
> ("sysenter") it was two instructions.

Actually, three instructions for "sysenter": the "movl %esp,%ebp" and the
actual "sysenter" instruction itself are the main restart sequence, but to
make it look the same as the legacy code from a kernel restart standpoint
there is also a short backwards jump there.

Anyway, you can't even trigger it with the single-step flag, since the
kernel will disable single-stepping in sysenter (and it only gets
re-enabled once the system call is done - including retries).

Since it literally requires an external interrupt to happen, it would be
pretty hard to create a test-case for. Maybe a dual-CPU setup with the
other CPU sending a signal (and the interrupt is the resultant IPI) at
just the right moment..

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: 2009-11-18 23:46    [W:1.875 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site