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

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