Re: [PATCH] x86_64,xen,espfix: Initialize espfix on secondary CPUs
From: Andy Lutomirski
Date: Tue Jul 15 2014 - 12:00:47 EST
On Tue, Jul 15, 2014 at 8:50 AM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 07/15/2014 08:38 AM, Konrad Rzeszutek Wilk wrote:
>> I think just disallowing would be preferrable.
> So I have yet to hear anyone talk about what the Xen PV IRET does for
> 16-bit stack segments. Can we get the answer for that, please?
If I'm reading the right thing, it does:
60 /* Mimic SYSRET behavior. */
61 movq 8(%rsp),%rcx # RIP
62 movq 24(%rsp),%r11 # RFLAGS
64 /* No special register assumptions. */
66 addq $8,%rsp
67 .Lft0: iretq
while running on Xen's stack. IOW, it leaks bits 31:16 of the Xen
stack, and there's nothing the guest can do about it short of using a
user-mode trampoline or disabling 16-bit stack segments entirely.
and (search for do_iret):
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/