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

Re: [Xen-devel] [PATCH for-4.8] x86/svm: Fix svm_nextrip_insn_length() when crossing the virtual boundary to 0



On 21/11/16 13:38, Boris Ostrovsky wrote:
> On 11/21/2016 05:40 AM, Andrew Cooper wrote:
>> On 16/11/16 10:51, Andrew Cooper wrote:
>>> vmcb->nextrip can legitimately be less than vmcb->rip when execution wraps
>>> back around to 0.  Instead, complain if the reported length is greater than 
>>> 15
>>> and use x86_decode_insn() as a fallback.
> Why do we need to complain? In the case that you are addressing by this
> patch wouldn't that be the expected result (length>15)?

No.  An instruction crossing the boundary looks like:

e.g. nextrip = 0x3, rip = 0xfffffffffffffffe

As this is all evaluated in unsigned long arithmetic, nextrip - rip
evaluates to 5, which is correct.

~Andrew

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

 


Rackspace

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