Commit f5d2799
x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS
commit f36cf38 upstream.
Intel provided the following information:
On all current Atom processors, instructions that use a segment register
value (e.g. a load or store) will not speculatively execute before the
last writer of that segment retires. Thus they will not use a
speculatively written segment value.
That means on ATOMs there is no speculation through SWAPGS, so the SWAPGS
entry paths can be excluded from the extra LFENCE if PTI is disabled.
Create a separate bug flag for the through SWAPGS speculation and mark all
out-of-order ATOMs and AMD/HYGON CPUs as not affected. The in-order ATOMs
are excluded from the whole mitigation mess anyway.
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>1 parent 49e1ce9 commit f5d2799
3 files changed
+32
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| 389 | + | |
389 | 390 | | |
390 | 391 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | 285 | | |
298 | 286 | | |
299 | 287 | | |
| |||
344 | 332 | | |
345 | 333 | | |
346 | 334 | | |
347 | | - | |
| 335 | + | |
| 336 | + | |
348 | 337 | | |
349 | | - | |
| 338 | + | |
| 339 | + | |
350 | 340 | | |
351 | 341 | | |
352 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
| 955 | + | |
955 | 956 | | |
956 | 957 | | |
957 | 958 | | |
| |||
975 | 976 | | |
976 | 977 | | |
977 | 978 | | |
978 | | - | |
979 | | - | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
984 | 985 | | |
985 | 986 | | |
986 | 987 | | |
987 | | - | |
| 988 | + | |
988 | 989 | | |
989 | | - | |
990 | | - | |
991 | | - | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
992 | 1001 | | |
993 | 1002 | | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
998 | 1007 | | |
999 | 1008 | | |
1000 | | - | |
| 1009 | + | |
1001 | 1010 | | |
1002 | 1011 | | |
1003 | 1012 | | |
| |||
1034 | 1043 | | |
1035 | 1044 | | |
1036 | 1045 | | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1037 | 1049 | | |
1038 | 1050 | | |
1039 | 1051 | | |
| |||
0 commit comments