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

Re: [Xen-devel] Xen hypercall API/ABI problems



On 20/06/13 10:01, Jan Beulich wrote:
>>>> On 19.06.13 at 17:43, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>> In memory.c, there is a possible unsigned->signed conversion error from
>> max_pages to rc.
> That's of no concern as long as the maximum possible value can't
> result in the value being negative. Plus it's problematic only when
> the hypervisor is 32-bit (as otherwise it's a conversion from
> "unsigned int" to "signed long".
>
> And for the list of items to be complete - there's a similar conversion
> for d->tot_pages.

In this case, 64bit domain on 64bit Xen is fine.  This hypercall is ok
as it really shouldn't be returning more than ((~0ULL)>>PAGE_SHIFT)

I guess the question boils down this:

Is it ok to retroactively apply -error semantics to hypercalls which
were previously defined to never return an error?  Already for the
compat layer a wrong value is being returned. All we would be doing is
changing from INT_MAX to -ERANGE which is differently wrong but more
consistent.

~Andrew

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