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

Re: [Xen-devel] [PATCH 03/22] libxc: Fix range checking in xc_dom_pfn_to_ptr etc.

On 10/06/13 16:48, Ian Jackson wrote:
> Andrew Cooper writes ("Re: [PATCH 03/22] libxc: Fix range checking in 
> xc_dom_pfn_to_ptr etc."):
>> In PATCH 2, the pages_out parameter is optional in so far as it is
>> checked for being NULL.
>> Here, the safe_region_out parameter is not optional, in so far as we
>> unconditionally fault if it is NULL. (unless someone is playing games
>> and mapping something at address 0)
> Maybe it would be better to change the function in patch 2, instead.
> After all, ideally, we don't want people calling either of these
> without receiving the length.  And the patch 2 function is provided
> specifically as a version to provide the length so there's no need to
> pass NULL.
> Ian.

But in patch 2, the non _pages() variant passes NULL as a parameter.

It could be modified to pass a pointer to a dummy value on the stack,
along with a note to fix up the original callsites in the general
bugfixes following the security patches.


Xen-devel mailing list



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