mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
b0bf1afde7
The barrier_nospec() after the array bounds check is overkill and
painfully slow for arches which implement it.
Furthermore, most arches don't implement it, so they remain exposed to
Spectre v1 (which can affect pretty much any CPU with branch
prediction).
Instead, clamp the user pointer to a valid range so it's guaranteed to
be a valid array index even when the bounds check mispredicts.
Fixes:
|
||
---|---|---|
.. | ||
cdrom.c | ||
gdrom.c | ||
Makefile |