Re: [PATCH] PPC32: cancel syscall restart on signal delivery

From: Linus Torvalds
Date: Fri Nov 14 2003 - 19:32:13 EST



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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/