Re: net: atm: Spectre v1 fix introduced bug in bcb964012d1b in -stable

From: Pavel Machek
Date: Mon May 20 2019 - 12:18:18 EST


On Mon 2019-05-20 09:15:50, Gustavo A. R. Silva wrote:
>
>
> On 5/20/19 7:40 AM, Pavel Machek wrote:
> >
> > In lecd_attach, if arg is < 0, it was treated as 0. Spectre v1 fix
> > changed that. Bug does not exist in mainline AFAICT.
> >
>
> NACK
>
> array_index_nospec() macro returns zero if *arg* is out of bounds.

No, it does not. Take a look:

#define array_index_nospec(index, size)
...
(typeof(_i)) (_i & _mask);
})

Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Attachment: signature.asc
Description: Digital signature