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

Re: [Xen-devel] [PATCH RFC v1 56/74] xen/pvshim: add grant table operations



>>> On 09.01.18 at 19:34, <roger.pau@xxxxxxxxxx> wrote:
> On Mon, Jan 08, 2018 at 10:19:39AM -0700, Jan Beulich wrote:
>> >>> On 04.01.18 at 14:06, <wei.liu2@xxxxxxxxxx> wrote:
>> > +    {
>> > +        struct gnttab_query_size op;
>> > +        int rc;
>> > +
>> > +        if ( unlikely(copy_from_guest(&op, uop, 1)) )
>> > +        {
>> > +            rc = -EFAULT;
>> > +            break;
>> > +        }
>> > +
>> > +        rc = xen_hypercall_grant_table_op(GNTTABOP_query_size, &op, 
>> > count);
>> > +        if ( rc )
>> > +            break;
>> > +
>> > +        if ( copy_to_guest(uop, &op, 1) )
>> 
>> __copy_to_guest() (assuming this coping in and out is necessary
>> in the first place).
> 
> I guess this could be bypassed by just using uop instead of op in the
> hypercall?

That's my impression, but you doing the copying made me assume
you might have found a case where things don't work without
copying.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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