check_spectre: ignore masked off data
commit4df548a80080afbebf8c9ad49ea4914ec747f68e
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Jun 2018 14:27:38 +0000 (13 17:27 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Jun 2018 14:27:38 +0000 (13 17:27 +0300)
tree690a53b76ab17292f8874e765bf31b63a6e83931
parent9cc13fe5cc6dbb2cd269f50dbbe5a6d3753fc8f3
check_spectre: ignore masked off data

Apparently, if you mask off the offset:

foo = array[offset & 0xff];

And the array has 256 elements, then the CPU won't speculatively access
beyond the end of the array.

Reported-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_spectre.c