You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2021. It is now read-only.
Copy file name to clipboardexpand all lines: os/disabling-smt.md
+20-14
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@
2
2
3
3
Recent Intel CPU vulnerabilities ([L1TF] and [MDS]) cannot be fully mitigated in software without disabling Simultaneous Multi-Threading. This can have a substantial performance impact and is only necessary for certain workloads, so for compatibility reasons, SMT is enabled by default.
4
4
5
-
SMT should be disabled on affected Intel processors under the following circumstances:
5
+
In addition, the Intel [TAA] vulnerability cannot be fully mitigated without disabling either of SMT or the Transactional Synchronization Extensions (TSX). Disabling TSX generally has less performance impact, so is the preferred approach on systems that don't otherwise need to disable SMT. For compatibility reasons, TSX is enabled by default.
6
+
7
+
SMT and TSX should be disabled on affected Intel processors under the following circumstances:
6
8
1. A bare-metal host runs untrusted virtual machines, and [other arrangements][l1tf-mitigation] have not been made for mitigation.
7
9
2. A bare-metal host runs untrusted code outside a virtual machine.
8
10
@@ -12,23 +14,26 @@ SMT can be conditionally disabled by passing `mitigations=auto,nosmt` on the ker
12
14
13
15
Alternatively, SMT can be unconditionally disabled by passing `nosmt` on the kernel command line. This provides the most protection and avoids possible behavior changes on upgrades, at the cost of a potentially unnecessary reduction in performance.
14
16
15
-
For typical use cases, we recommend enabling the `mitigations=auto,nosmt` command-line option.
17
+
TSX can be conditionally disabled on vulnerable CPUs by passing `tsx=auto` on the kernel command line, or unconditionally disabled by passing `tsx=off`. However, neither setting takes effect on systems affected by MDS, since MDS mitigation automatically protects against TAA as well.
18
+
19
+
For typical use cases, we recommend enabling the `mitigations=auto,nosmt` and `tsx=auto` command-line options.
The following Container Linux config performs two tasks:
28
+
The following Container Linux Config performs two tasks:
24
29
25
-
1. Adds `mitigations=auto,nosmt` to the kernel command line. This affects the second and subsequent boots of the machine, but not the first boot.
30
+
1. Adds `mitigations=auto,nosmt tsx=auto` to the kernel command line. This affects the second and subsequent boots of the machine, but not the first boot.
26
31
2. On the first boot, disables SMT at runtime if the system has an Intel processor. This is sufficient to protect against currently-known SMT vulnerabilities until the system is rebooted. After reboot, SMT will be re-enabled if the processor is not actually vulnerable.
27
32
28
33
```yaml container-linux-config
29
-
# Add kernel command-line argument to automatically disable SMT on CPUs
30
-
# where it is vulnerable. This will affect the second and subsequent
31
-
# boots of the machine, but not the first boot.
34
+
# Add kernel command-line arguments to automatically disable SMT or TSX
35
+
#on CPUs where they are vulnerable. This will affect the second and
36
+
#subsequent boots of the machine, but not the first boot.
32
37
storage:
33
38
filesystems:
34
39
- name: OEM
@@ -42,12 +47,13 @@ storage:
42
47
mode: 0644
43
48
contents:
44
49
inline: |
45
-
# Disable SMT on CPUs affected by MDS or similar vulnerabilities
46
-
set linux_append="$linux_append mitigations=auto,nosmt"
50
+
# Disable SMT on CPUs affected by MDS or similar vulnerabilities.
51
+
# Disable TSX on CPUs affected by TAA but not by MDS.
52
+
set linux_append="$linux_append mitigations=auto,nosmt tsx=auto"
47
53
48
54
# On the first boot only, disable SMT at runtime if it is enabled and
49
-
# the system has an Intel CPU. L1TFand MDS vulnerabilities are limited
50
-
# to Intel CPUs.
55
+
# the system has an Intel CPU. L1TF, MDS, and TAA vulnerabilities are
56
+
#limited to Intel CPUs.
51
57
systemd:
52
58
units:
53
59
- name: disable-smt-firstboot.service
@@ -70,16 +76,16 @@ systemd:
70
76
71
77
## Configuring existing machines
72
78
73
-
To add `mitigations=auto,nosmt` to the kernel command line on an existing system, add the following line to `/usr/share/oem/grub.cfg`:
79
+
To add `mitigations=auto,nosmt tsx=auto` to the kernel command line on an existing system, add the following line to `/usr/share/oem/grub.cfg`:
74
80
75
81
```
76
-
set linux_append="$linux_append mitigations=auto,nosmt"
82
+
set linux_append="$linux_append mitigations=auto,nosmt tsx=auto"
0 commit comments