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

Re: [Xen-devel] [V10 PATCH 12/23] PVH xen: Support privileged op emulation for PVH



On Wed, Aug 7, 2013 at 3:23 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>> On 07.08.13 at 15:49, George Dunlap <dunlapg@xxxxxxxxx> wrote:
>>> @@ -1835,7 +1889,7 @@ static inline uint64_t guest_misc_enable(uint64_t val)
>>>          _ptr = (unsigned int)_ptr;                                         
>>>  \
>>>      if ( (limit) < sizeof(_x) - 1 || (eip) > (limit) - (sizeof(_x) - 1) )  
>>>  \
>>>          goto fail;                                                         
>>>  \
>>> -    if ( (_rc = copy_from_user(&_x, (type *)_ptr, sizeof(_x))) != 0 )      
>>>  \
>>> +    if ( (_rc = raw_copy_from_guest(&_x, (type *)_ptr, sizeof(_x))) != 0 ) 
>>>  \
>>
>> Why is this changed?
>
> copy_from_user() accesses memory directly, i.e. is not suitable
> for dereferencing a pointer into the virtual memory space of a
> PVH/HVM guest.

Oh right -- sorry, I noticed adding the "raw", but not the change from
user -> guest.

This should be mentioned in the commit message at any rate.

 -George

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