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

Re: [Xen-devel] [PATCH 4/4] xen/public: arm: rework the macro set_xen_guest_handle_raw



On Wed, 2015-11-04 at 14:42 +0000, Julien Grall wrote:
> On 04/11/15 14:29, Ian Campbell wrote:
> > > > > > This looses out on the arm32 hypervisor sanity checking that
> > > > > > the
> > > > > > padding
> > > > > > bytes are 0 (as required by the ABI) but TBH I haven't checked
> > > > > > that
> > > > > > the
> > > > > > current version has that property either.
> > > > > 
> > > > > It's done during the assignation by the compiler:
> > > > > 
> > > > > (hnd).q = (uint64_t)(uintptr_t)(val);
> > > > 
> > > > I meant on the reading side.
> > > 
> > > It's the responsibility of the caller to zero the padding. There is
> > > nothing to do on the reading side, the hypervisor will use "p" which
> > > will be the size of the natural pointer.
> > 
> > For a 32-bit Xen the check would be that a guest was not inadvertently
> > violating this rule, such a guest would crash if it was run on a 64-bit
> > hypervisor (which would see the non-zero padding as part of the
> > pointer),
> > by rejecting such cases on 32-bit Xen we avoid such guests becoming
> > established and therefore presenting a case for us to relax this rule
> > in
> > one way or another.
> 
> It would add overhead each time we want to copy to/from the guest memory.

I was simply commenting that the approach taken here might be removing such
a check _if_ it exists today, and as I said up front I'm not sure we have
such a check right now or not.

I'm not suggesting you add one as a new check, just that _if_ it already
exists then it being removed needs to be considered.

Ian.


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