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

Re: [Xen-devel] [PATCH v2] x86: assorted array_index_nospec() insertions



> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: 26 July 2018 14:41
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>; Andrew Cooper
> <Andrew.Cooper3@xxxxxxxxxx>; xen-devel <xen-
> devel@xxxxxxxxxxxxxxxxxxxx>; Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
> Subject: RE: [PATCH v2] x86: assorted array_index_nospec() insertions
> 
> >>> On 26.07.18 at 15:25, <Paul.Durrant@xxxxxxxxxx> wrote:
> >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> >> Sent: 26 July 2018 14:07
> > Using something called 'array_index_nospec()' for an array size and having
> > to adjust by 1 is kind of a bit ugly but it looks correct.
> 
> Indeed, and as you may have seen from the change log I've had it
> wrong at first for this very reason.

Yes, which makes me wonder whether we could have something like 
'array_size_limit()' just to hide this kind of thing?

  Paul

> 
> > Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
> 
> Thanks.
> 
> Jan
> 


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