Re: [RFC] de-asmify the x86-64 system call slowpath

From: Andy Lutomirski
Date: Mon Jan 27 2014 - 19:45:16 EST


On Mon, Jan 27, 2014 at 4:22 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 01/27/2014 02:46 PM, Andy Lutomirski wrote:
>>
>> I think that sysret for sigreturn is probably not very interesting.
>> On the other hand, sysret for #PF might be a huge win, despite being
>> even scarier.
>>
>
> SYSRET for #PF or other exceptions is a nonstarter; register state is
> live at that point.

I mean sysret-via-trampoline for #PF.

It's scary, it probably has issues with ptrace and interrupts that hit
while the trampoline is still running, and it could break anything
that writes past the red zone, but I think it could work.

No, I don't particularly want to implement (and debug) such a beast.

(I will continue cursing Intel -- why can't we have a fast way to
return to 64-bit userspace with complete control of all non-segment
registers? sysret is *almost* the right thing.)

--Andy

>
> -hpa
>
>



--
Andy Lutomirski
AMA Capital Management, LLC
--
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/