[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 2/7] Clear AC bit in RFLAGS to protect Xen itself by SMAP




> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: Thursday, April 24, 2014 7:37 PM
> To: Andrew Cooper; Wu, Feng
> Cc: ian.campbell@xxxxxxxxxx; Dong, Eddie; Nakajima, Jun; Tian, Kevin;
> xen-devel@xxxxxxxxxxxxx
> Subject: Re: [PATCH v2 2/7] Clear AC bit in RFLAGS to protect Xen itself by 
> SMAP
> 
> >>> On 24.04.14 at 12:51, <andrew.cooper3@xxxxxxxxxx> wrote:
> > On 24/04/14 08:20, Wu, Feng wrote:
> >>> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> >>>>>> On 24.04.14 at 08:45, <feng.wu@xxxxxxxxx> wrote:
> >>>>> From: Andrew Cooper [mailto:andrew.cooper3@xxxxxxxxxx]
> >>>>> On 23/04/14 15:35, Feng Wu wrote:
> >>>>>> @@ -268,6 +269,7 @@ bad_hypercall:
> >>>>>>          jmp  test_all_events
> >>>>>>
> >>>>>>  ENTRY(sysenter_entry)
> >>>>>> +        ASM_CLAC
> >>>>>>          sti
> >>>>>>          pushq $FLAT_USER_SS
> >>>>>>          pushq $0
> >>> Looking at this again, btw, makes me thing that the clac should go
> >>> after the sti here.
> >
> > It must be after sysenter_eflags_saved, or we will erroneously clear the
> > AC flag from the flags used to restore guest context.
> 
> Indeed, and not just AC considering that the macro right now involves
> a conditional branch.
> 

Thanks for your comments, I will change this, which may involve bugs here.

> Jan

Thanks,
Feng

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.