Gustavo A. R. Silva 6497d0a9c5 IB/hfi1: Fix Spectre v1 vulnerability
sl is controlled by user-space, hence leading to a potential
exploitation of the Spectre variant 1 vulnerability.

Fix this by sanitizing sl before using it to index ibp->sl_to_sc.

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://lore.kernel.org/lkml/20180423164740.GY17484@dhcp22.suse.cz/

Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Link: https://lore.kernel.org/r/20190731175428.GA16736@embeddedor
Signed-off-by: Doug Ledford <dledford@redhat.com>
2019-08-01 12:14:15 -04:00
..
2019-06-28 22:34:26 -03:00
2019-06-28 22:34:26 -03:00
2018-05-24 09:39:25 -06:00
2019-05-06 12:57:45 -03:00
2019-05-30 15:40:50 -03:00
2019-02-05 18:07:43 -05:00
2019-04-24 11:31:49 -03:00
2019-06-28 22:34:26 -03:00
2019-06-28 21:18:23 -03:00
2019-02-05 18:07:44 -05:00
2019-07-22 14:57:55 -03:00
2019-06-24 19:19:53 +02:00
2019-03-28 11:03:49 -03:00
2019-01-31 11:37:40 -05:00
2019-01-31 11:37:40 -05:00
2019-08-01 12:14:15 -04:00
2019-05-09 09:02:46 -07:00