← Documents Documentation/arch/x86/tsx_async_abort.rst GitHub 원문 ↗

Linux 6.18.37 · Architecture

TSX Async Abort (TAA) Mitigation

TAA 취약점, TSX·buffer-clear 완화와 IA32_TSX_CTRL 조합을 설명합니다.

Source pathDocumentation/arch/x86/tsx_async_abort.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

tsx_async_abort.rst:1-117

TAA는 TSX transaction의 asynchronous abort 중 internal buffer의 stale data가 speculative하게 노출되는 MDS 계열 공격입니다. kernel은 TSX를 끄거나 `VERW`로 CPU buffer를 지우며 RTM, `MD_CLEAR`, architecture capability bit에 따라 mode를 선택합니다.

`tsx=off|on|auto`와 `tsx_async_abort=off|full`의 결과는 `TAA_NO`, `MDS_NO`, `TSX_CTRL_MSR` 조합에 따라 달라집니다. `IA32_TSX_CTRL`은 RTM 실행과 RTM/HLE CPUID enumeration을 각각 제어합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 TSX Async Abort (TAA) mitigation
4 ================================
5
6 .. _tsx_async_abort:
7
8 Overview
9 --------
10
11 TSX Async Abort (TAA) is a side channel attack on internal buffers in some
12 Intel processors similar to Microachitectural Data Sampling (MDS). In this
13 case certain loads may speculatively pass invalid data to dependent operations
14 when an asynchronous abort condition is pending in a Transactional
15 Synchronization Extensions (TSX) transaction. This includes loads with no
16 fault or assist condition. Such loads may speculatively expose stale data from
17 the same uarch data structures as in MDS, with same scope of exposure i.e.
18 same-thread and cross-thread. This issue affects all current processors that
19 support TSX.
20
21 Mitigation strategy
22 -------------------
23
24 a) TSX disable - one of the mitigations is to disable TSX. A new MSR
25 IA32_TSX_CTRL will be available in future and current processors after
26 microcode update which can be used to disable TSX. In addition, it
27 controls the enumeration of the TSX feature bits (RTM and HLE) in CPUID.
28
29 b) Clear CPU buffers - similar to MDS, clearing the CPU buffers mitigates this
30 vulnerability. More details on this approach can be found in
31 :ref:`Documentation/admin-guide/hw-vuln/mds.rst <mds>`.
32
33 Kernel internal mitigation modes
34 --------------------------------
35
36 ============= ============================================================
37 off Mitigation is disabled. Either the CPU is not affected or
38 tsx_async_abort=off is supplied on the kernel command line.
39
40 tsx disabled Mitigation is enabled. TSX feature is disabled by default at
41 bootup on processors that support TSX control.
42
43 verw Mitigation is enabled. CPU is affected and MD_CLEAR is
44 advertised in CPUID.
45
46 ucode needed Mitigation is enabled. CPU is affected and MD_CLEAR is not
47 advertised in CPUID. That is mainly for virtualization
48 scenarios where the host has the updated microcode but the
49 hypervisor does not expose MD_CLEAR in CPUID. It's a best
50 effort approach without guarantee.
51 ============= ============================================================
52
53 If the CPU is affected and the "tsx_async_abort" kernel command line parameter is
54 not provided then the kernel selects an appropriate mitigation depending on the
55 status of RTM and MD_CLEAR CPUID bits.
56
57 Below tables indicate the impact of tsx=on|off|auto cmdline options on state of
58 TAA mitigation, VERW behavior and TSX feature for various combinations of
59 MSR_IA32_ARCH_CAPABILITIES bits.
60
61 1. "tsx=off"
62
63 ========= ========= ============ ============ ============== =================== ======================
64 MSR_IA32_ARCH_CAPABILITIES bits Result with cmdline tsx=off
65 ---------------------------------- -------------------------------------------------------------------------
66 TAA_NO MDS_NO TSX_CTRL_MSR TSX state VERW can clear TAA mitigation TAA mitigation
67 after bootup CPU buffers tsx_async_abort=off tsx_async_abort=full
68 ========= ========= ============ ============ ============== =================== ======================
69 0 0 0 HW default Yes Same as MDS Same as MDS
70 0 0 1 Invalid case Invalid case Invalid case Invalid case
71 0 1 0 HW default No Need ucode update Need ucode update
72 0 1 1 Disabled Yes TSX disabled TSX disabled
73 1 X 1 Disabled X None needed None needed
74 ========= ========= ============ ============ ============== =================== ======================
75
76 2. "tsx=on"
77
78 ========= ========= ============ ============ ============== =================== ======================
79 MSR_IA32_ARCH_CAPABILITIES bits Result with cmdline tsx=on
80 ---------------------------------- -------------------------------------------------------------------------
81 TAA_NO MDS_NO TSX_CTRL_MSR TSX state VERW can clear TAA mitigation TAA mitigation
82 after bootup CPU buffers tsx_async_abort=off tsx_async_abort=full
83 ========= ========= ============ ============ ============== =================== ======================
84 0 0 0 HW default Yes Same as MDS Same as MDS
85 0 0 1 Invalid case Invalid case Invalid case Invalid case
86 0 1 0 HW default No Need ucode update Need ucode update
87 0 1 1 Enabled Yes None Same as MDS
88 1 X 1 Enabled X None needed None needed
89 ========= ========= ============ ============ ============== =================== ======================
90
91 3. "tsx=auto"
92
93 ========= ========= ============ ============ ============== =================== ======================
94 MSR_IA32_ARCH_CAPABILITIES bits Result with cmdline tsx=auto
95 ---------------------------------- -------------------------------------------------------------------------
96 TAA_NO MDS_NO TSX_CTRL_MSR TSX state VERW can clear TAA mitigation TAA mitigation
97 after bootup CPU buffers tsx_async_abort=off tsx_async_abort=full
98 ========= ========= ============ ============ ============== =================== ======================
99 0 0 0 HW default Yes Same as MDS Same as MDS
100 0 0 1 Invalid case Invalid case Invalid case Invalid case
101 0 1 0 HW default No Need ucode update Need ucode update
102 0 1 1 Disabled Yes TSX disabled TSX disabled
103 1 X 1 Enabled X None needed None needed
104 ========= ========= ============ ============ ============== =================== ======================
105
106 In the tables, TSX_CTRL_MSR is a new bit in MSR_IA32_ARCH_CAPABILITIES that
107 indicates whether MSR_IA32_TSX_CTRL is supported.
108
109 There are two control bits in IA32_TSX_CTRL MSR:
110
111 Bit 0: When set it disables the Restricted Transactional Memory (RTM)
112 sub-feature of TSX (will force all transactions to abort on the
113 XBEGIN instruction).
114
115 Bit 1: When set it disables the enumeration of the RTM and HLE feature
116 (i.e. it will make CPUID(EAX=7).EBX{bit4} and
117 CPUID(EAX=7).EBX{bit11} read as 0).
118

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

TSX Async Abort 개요

1-20

이 문서는 `SPDX-License-Identifier: GPL-2.0`으로 배포됩니다. TSX Async Abort(TAA)는 일부 Intel processor의 internal buffer를 노리는 side-channel attack이며 Microarchitectural Data Sampling (MDS)과 유사합니다.

Transactional Synchronization Extensions(TSX) transaction에 asynchronous abort condition이 pending 상태일 때 일부 load가 invalid data를 dependent operation에 speculative하게 전달할 수 있습니다. fault나 assist condition이 없는 load도 여기에 포함됩니다.

이런 load는 MDS와 같은 microarchitecture data structure에 남은 stale data를 speculative하게 노출할 수 있으며 exposure scope도 same-thread와 cross-thread로 같습니다. 이 문제는 TSX를 지원하는 현재의 모든 processor에 영향을 줍니다.

TAA 완화 전략

21-32

TAA에는 다음 두 가지 mitigation strategy가 있습니다.

  • `TSX disable`: 향후 processor와 microcode update를 적용한 현재 processor에서 제공되는 새 `IA32_TSX_CTRL` MSR로 TSX를 비활성화합니다. 이 MSR은 CPUID의 TSX feature bit인 RTM과 HLE enumeration도 제어합니다.
  • `Clear CPU buffers`: MDS와 마찬가지로 CPU buffer를 비우면 이 취약점을 완화합니다. 자세한 내용은 `Documentation/admin-guide/hw-vuln/mds.rst`의 `mds` reference를 참고하십시오.

kernel 내부 mitigation mode

33-60
mode상태와 선택 조건
`off`mitigation이 비활성화되어 있습니다. CPU가 영향을 받지 않거나 kernel command line에 `tsx_async_abort=off`를 지정한 경우입니다.
`tsx disabled`mitigation이 활성화되어 있습니다. TSX control을 지원하는 processor에서 boot 시 기본적으로 TSX feature를 비활성화합니다.
`verw`mitigation이 활성화되어 있습니다. CPU가 영향을 받고 CPUID가 `MD_CLEAR`를 광고합니다.
`ucode needed`mitigation이 활성화되어 있습니다. CPU가 영향을 받지만 CPUID가 `MD_CLEAR`를 광고하지 않습니다. 주로 host에는 updated microcode가 있지만 hypervisor가 CPUID에 `MD_CLEAR`를 노출하지 않는 virtualization scenario를 위한 best-effort 방식이며 보장은 없습니다.

CPU가 영향을 받고 `tsx_async_abort` kernel command-line parameter가 없으면 kernel은 RTM과 `MD_CLEAR` CPUID bit 상태에 따라 적절한 mitigation을 선택합니다.

아래 표는 `MSR_IA32_ARCH_CAPABILITIES` bit 조합별로 `tsx=on|off|auto` command-line option이 TAA mitigation 상태, `VERW` 동작, TSX feature에 미치는 영향을 보여 줍니다.

tsx=off 조합표

61-75
`TAA_NO``MDS_NO``TSX_CTRL_MSR`boot 후 TSX 상태`VERW`의 CPU buffer clear`tsx_async_abort=off``tsx_async_abort=full`
000`HW default`가능MDS와 동일MDS와 동일
001`Invalid case``Invalid case``Invalid case``Invalid case`
010`HW default`불가능`Need ucode update``Need ucode update`
011`Disabled`가능`TSX disabled``TSX disabled`
1X1`Disabled`X`None needed``None needed`

tsx=on 조합표

76-90
`TAA_NO``MDS_NO``TSX_CTRL_MSR`boot 후 TSX 상태`VERW`의 CPU buffer clear`tsx_async_abort=off``tsx_async_abort=full`
000`HW default`가능MDS와 동일MDS와 동일
001`Invalid case``Invalid case``Invalid case``Invalid case`
010`HW default`불가능`Need ucode update``Need ucode update`
011`Enabled`가능`None`MDS와 동일
1X1`Enabled`X`None needed``None needed`

tsx=auto 조합표

91-105
`TAA_NO``MDS_NO``TSX_CTRL_MSR`boot 후 TSX 상태`VERW`의 CPU buffer clear`tsx_async_abort=off``tsx_async_abort=full`
000`HW default`가능MDS와 동일MDS와 동일
001`Invalid case``Invalid case``Invalid case``Invalid case`
010`HW default`불가능`Need ucode update``Need ucode update`
011`Disabled`가능`TSX disabled``TSX disabled`
1X1`Enabled`X`None needed``None needed`

IA32_TSX_CTRL control bit

106-117

표의 `TSX_CTRL_MSR`은 `MSR_IA32_ARCH_CAPABILITIES`의 새 bit이며 `MSR_IA32_TSX_CTRL` 지원 여부를 나타냅니다.

`IA32_TSX_CTRL` MSR에는 두 control bit가 있습니다.

bit동작
Bit 0설정하면 TSX의 Restricted Transactional Memory(RTM) sub-feature를 비활성화하며 모든 transaction이 `XBEGIN` instruction에서 abort하도록 강제합니다.
Bit 1설정하면 RTM과 HLE feature enumeration을 비활성화해 `CPUID(EAX=7).EBX{bit4}`와 `CPUID(EAX=7).EBX{bit11}`이 0으로 읽히게 합니다.