Skip to content
This repository was archived by the owner on Feb 12, 2021. It is now read-only.

Commit 29d8bab

Browse files
authored
Merge pull request #1283 from bgilbert/taa
os/disabling-smt: document TAA mitigation
2 parents d403f23 + 1856a8d commit 29d8bab

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

os/disabling-smt.md

+20-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
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.
44

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:
68
1. A bare-metal host runs untrusted virtual machines, and [other arrangements][l1tf-mitigation] have not been made for mitigation.
79
2. A bare-metal host runs untrusted code outside a virtual machine.
810

@@ -12,23 +14,26 @@ SMT can be conditionally disabled by passing `mitigations=auto,nosmt` on the ker
1214

1315
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.
1416

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.
1620

1721
[L1TF]: https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html
1822
[l1tf-mitigation]: https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html#mitigation-selection-guide
1923
[MDS]: https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html
24+
[TAA]: https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/tsx_async_abort.html
2025

2126
## Configuring new machines
2227

23-
The following Container Linux config performs two tasks:
28+
The following Container Linux Config performs two tasks:
2429

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.
2631
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.
2732

2833
```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.
3237
storage:
3338
filesystems:
3439
- name: OEM
@@ -42,12 +47,13 @@ storage:
4247
mode: 0644
4348
contents:
4449
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"
4753
4854
# On the first boot only, disable SMT at runtime if it is enabled and
49-
# the system has an Intel CPU. L1TF and 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.
5157
systemd:
5258
units:
5359
- name: disable-smt-firstboot.service
@@ -70,16 +76,16 @@ systemd:
7076
7177
## Configuring existing machines
7278
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`:
7480

7581
```
76-
set linux_append="$linux_append mitigations=auto,nosmt"
82+
set linux_append="$linux_append mitigations=auto,nosmt tsx=auto"
7783
```
7884
7985
For example, using SSH:
8086
8187
```sh
82-
ssh core@node01 'sudo sh -c "echo \"set linux_append=\\\"\\\$linux_append mitigations=auto,nosmt\\\"\" >> /usr/share/oem/grub.cfg && systemctl reboot"'
88+
ssh core@node01 'sudo sh -c "echo \"set linux_append=\\\"\\\$linux_append mitigations=auto,nosmt tsx=auto\\\"\" >> /usr/share/oem/grub.cfg && systemctl reboot"'
8389
```
8490

8591
If you use locksmith for reboot coordination, replace `systemctl reboot` with `locksmithctl send-need-reboot`.

0 commit comments

Comments
 (0)