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

Re: [Xen-devel] [PATCH] xen: hypercall: fix out-of-bounds memcpy



From: Arnd Bergmann
> Sent: 05 February 2018 12:37
....
> > Are the EVTCHNOP_xxx values dense?
> > In which case an array is almost certainly better than the switch statement.
> 
> They are, yes. PHYSDEVOP_xxx are also consecutive by start at '4'.
> Dan made the same comment earlier, and I replied that my I had
> considered it but went for the more failsafe route. I also verified my
> assumption now that gcc in fact is smart enough to turn this
> into a table by itself:

I've never spotted that optimisation, must be fairly new.

        David

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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