[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



>>> 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.

Jan


_______________________________________________
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®.