Re: espfix and 5-level paging

From: Andy Lutomirski
Date: Wed May 31 2017 - 09:57:18 EST


On Sat, May 27, 2017 at 2:30 PM, Yuhong Bao <YuhongBao_386@xxxxxxxxxxx> wrote:
> I don't like espfix of course, and would probably manually fix it to N in the kernel config unless I really had to run buggy DPMI apps.
> Win8 decided to just disable NTVDM by default instead.
> ________________________________________
> From: Yuhong Bao
> Sent: Saturday, May 13, 2017 2:39:59 AM
> To: kirill.shutemov@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: espfix and 5-level paging
>
> Instead of porting espfix to 5-level paging, why not fix the IRET instruction?
> It probably should not require even a CR4 flag to enable.

I have no context here. It would be great if Intel and/or AMD were to
fix IRET. Meanwhile, we can work around it in the kernel, which we do
if MODIFY_LDT is on and configured to allow 16-bit segments. If you
don't want 16-bit segments, you can turn them off.

(This has nothing to do with buggy DPMI apps. It affects pretty much
all 16-bit code.)