> -----Original Message-----
> From: Jan Beulich <jbeul...@suse.com>
> Sent: 19 May 2020 14:49
> To: Paul Durrant <p...@xen.org>
> Cc: xen-devel@lists.xenproject.org; Paul Durrant <pdurr...@amazon.com>; 
> Daniel De Graaf
> <dgde...@tycho.nsa.gov>; Ian Jackson <ian.jack...@eu.citrix.com>; Wei Liu 
> <w...@xen.org>; Andrew Cooper
> <andrew.coop...@citrix.com>; George Dunlap <george.dun...@citrix.com>; Julien 
> Grall <jul...@xen.org>;
> Stefano Stabellini <sstabell...@kernel.org>
> Subject: Re: [PATCH v3 2/5] xen/common/domctl: introduce 
> XEN_DOMCTL_get/setdomaincontext
> 
> On 14.05.2020 12:44, Paul Durrant wrote:
> > --- a/xen/include/public/domctl.h
> > +++ b/xen/include/public/domctl.h
> > @@ -1129,6 +1129,43 @@ struct xen_domctl_vuart_op {
> >                                   */
> >  };
> >
> > +/*
> > + * XEN_DOMCTL_getdomaincontext
> > + * ---------------------------
> > + *
> > + * buffer (IN):   The buffer into which the context data should be
> > + *                copied, or NULL to query the buffer size that should
> > + *                be allocated.
> > + * size (IN/OUT): If 'buffer' is NULL then the value passed in must be
> > + *                zero, and the value passed out will be the size of the
> > + *                buffer to allocate.
> > + *                If 'buffer' is non-NULL then the value passed in must
> > + *                be the size of the buffer into which data may be copied.
> > + *                The value passed out will be the size of data written.
> > + */
> > +struct xen_domctl_getdomaincontext {
> > +    uint32_t size;
> > +    uint32_t pad;
> 
> This and its counterpart don't seem to get checked to be zero.
> While an option for a domctl, any desire to use the field in
> the future would then require an interface version bump.
> 

Indeed. It does need to be zero checked.

  Paul

> Jan


Reply via email to