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

Re: [PATCH] xen/privcmd: allow fetching resource sizes



On 1/11/21 10:29 AM, Roger Pau Monne wrote:
>  
> +     xdata.domid = kdata.dom;
> +     xdata.type = kdata.type;
> +     xdata.id = kdata.id;
> +
> +     if (!kdata.addr && !kdata.num) {


I think we should not allow only one of them to be zero. If it's only kdata.num 
then we will end up with pfns array set to ZERO_SIZE_PTR (which is 0x10). We 
seem to be OK in that we are not derefencing pfns (either in kernel or in 
hypervisor) if number of frames is zero but IMO we shouldn't be tempting the 
fate.


(And if it's only kdata.addr then we will get a vma but I am not sure it will 
do what we want.)


-boris





 


Rackspace

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