Skip to contentSkip to conversation

Documentation: Unify format for vulnerability sysfs

PATCH In review Takahiro Itazuri 2 participants 2 messages Sep 12, 2024 – Sep 13, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: Unify format for vulnerability sysfs

The format for vulnerability sysfs files was diverge across pages.

Unifies the format as follows:

* Use list table for possible values for the sysfs files, because simple table does not allow line breaks for the first column; otherwise recognized as multiple different rows

* Insert 2-spaces indentation before a sysfs path

* Wrap each possible value with single quotes

* End description with a full stop

* Apply 80 columns rule

---
Changes in v4:
- Rename vuln to vulnerability in commit message
- Apply 80 columns rule
- Link to v3: https://lore.kernel.org/all/[email protected]/

Changes in v3:
- Return to list table in favor of presevation of the existing HTML appearance and readability/editability in plain text format.
- Link to v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:
- Use grid table over list table (applying to not only GDS but also other vulnerabilities)
- Link to v1: https://lore.kernel.org/all/[email protected]/

---
 .../hw-vuln/gather_data_sampling.rst          |  44 +++---
 Documentation/admin-guide/hw-vuln/l1tf.rst    |  37 +++--
 Documentation/admin-guide/hw-vuln/mds.rst     |  69 ++++----
 .../admin-guide/hw-vuln/multihit.rst          |  28 ++--
 .../hw-vuln/processor_mmio_stale_data.rst     |  72 +++++----
 .../hw-vuln/reg-file-data-sampling.rst        |  27 ++--
 .../special-register-buffer-data-sampling.rst |  39 +++--
 Documentation/admin-guide/hw-vuln/spectre.rst | 149 +++++++++++-------
 Documentation/admin-guide/hw-vuln/srso.rst    |  81 +++++-----
 .../admin-guide/hw-vuln/tsx_async_abort.rst   |  52 +++---
 10 files changed, 343 insertions(+), 255 deletions(-)
Documentation/admin-guide/hw-vuln/gather_data_sampling.rst +26 -18
index 264bfa937f7d..815c78acc4be 100644
@@ -81,27 +81,35 @@ GDS System Information
 The kernel provides vulnerability status information through sysfs. For
 GDS this can be accessed by the following sysfs file:
 
-/sys/devices/system/cpu/vulnerabilities/gather_data_sampling
+  /sys/devices/system/cpu/vulnerabilities/gather_data_sampling
 
 The possible values contained in this file are:
 
- ============================== =============================================
- Not affected                   Processor not vulnerable.
- Vulnerable                     Processor vulnerable and mitigation disabled.
- Vulnerable: No microcode       Processor vulnerable and microcode is missing
-                                mitigation.
- Mitigation: AVX disabled,
- no microcode                   Processor is vulnerable and microcode is missing
-                                mitigation. AVX disabled as mitigation.
- Mitigation: Microcode          Processor is vulnerable and mitigation is in
-                                effect.
- Mitigation: Microcode (locked) Processor is vulnerable and mitigation is in
-                                effect and cannot be disabled.
- Unknown: Dependent on
- hypervisor status              Running on a virtual guest processor that is
-                                affected but with no way to know if host
-                                processor is mitigated or vulnerable.
- ============================== =============================================
+.. list-table::
+
+  * - 'Not affected'
+    - Processor not vulnerable.
+
+  * - 'Vulnerable'
+    - Processor vulnerable and mitigation disabled.
+
+  * - 'Vulnerable: No microcode'
+    - Processor vulnerable and microcode is missing migitation.
+
+  * - 'Mitigation: AVX disabled, no microcode'
+    - Processor is vulnerable and microcode is missing mitigation. AVX disabled
+      as mitigation.
+
+  * - 'Mitigation: Microcode'
+    - Processor is vulnerable and mitigation is in effect.
+
+  * - 'Mitigation: Microcode (locked)'
+    - Processor is vulnerable and mitigation is in effect and cannot be
+      disabled.
+
+  * - 'Unknown: Dependent on hypervisor status'
+    - Running on a virtual guest processor that is affected but with no way to
+      know if host processor is mitigated or vulnerable.
 
 GDS Default mitigation
 ----------------------
Documentation/admin-guide/hw-vuln/l1tf.rst +23 -14
index 3eeeb488d955..a049e1ab935c 100644
@@ -123,34 +123,43 @@ The Linux kernel provides a sysfs interface to enumerate the current L1TF
 status of the system: whether the system is vulnerable, and which
 mitigations are active. The relevant sysfs file is:
 
-/sys/devices/system/cpu/vulnerabilities/l1tf
+  /sys/devices/system/cpu/vulnerabilities/l1tf
 
 The possible values in this file are:
 
-  ===========================   ===============================
-  'Not affected'		The processor is not vulnerable
-  'Mitigation: PTE Inversion'	The host protection is active
-  ===========================   ===============================
+.. list-table::
+
+  * - 'Not affected'
+    - The processor is not vulnerable.
+
+  * - 'Mitigation: PTE Inversion'
+    - The host protection is active.
 
 If KVM/VMX is enabled and the processor is vulnerable then the following
 information is appended to the 'Mitigation: PTE Inversion' part:
 
   - SMT status:
 
-    =====================  ================
-    'VMX: SMT vulnerable'  SMT is enabled
-    'VMX: SMT disabled'    SMT is disabled
-    =====================  ================
+    .. list-table::
+
+      * - 'VMX: SMT vulnerable'
+        - SMT is enabled.
+
+      * - 'VMX: SMT disabled'
+        - SMT is disabled.
 
   - L1D Flush mode:
 
-    ================================  ====================================
-    'L1D vulnerable'		      L1D flushing is disabled
+    .. list-table::
+
+      * - 'L1D vulnerable'
+        - L1D flushing is disabled.
 
-    'L1D conditional cache flushes'   L1D flush is conditionally enabled
+      * - 'L1D conditional cache flushes'
+        - L1D flush is conditionally enabled.
 
-    'L1D cache flushes'		      L1D flush is unconditionally enabled
-    ================================  ====================================
+      * - 'L1D cache flushes'
+        - L1D flush is unconditionally enabled.
 
 The resulting grade of protection is discussed in the following sections.
 
Documentation/admin-guide/hw-vuln/mds.rst +39 -30

82 lines not on this page · raw message

Documentation/admin-guide/hw-vuln/multihit.rst +17 -11
index 140e4cec38c3..618552fb7149 100644
@@ -70,22 +70,28 @@ The Linux kernel provides a sysfs interface to enumerate the current iTLB
 multihit status of the system:whether the system is vulnerable and which
 mitigations are active. The relevant sysfs file is:
 
-/sys/devices/system/cpu/vulnerabilities/itlb_multihit
+  /sys/devices/system/cpu/vulnerabilities/itlb_multihit
 
 The possible values in this file are:
 
 .. list-table::
 
-     * - Not affected
-       - The processor is not vulnerable.
-     * - KVM: Mitigation: Split huge pages
-       - Software changes mitigate this issue.
-     * - KVM: Mitigation: VMX unsupported
-       - KVM is not vulnerable because Virtual Machine Extensions (VMX) is not supported.
-     * - KVM: Mitigation: VMX disabled
-       - KVM is not vulnerable because Virtual Machine Extensions (VMX) is disabled.
-     * - KVM: Vulnerable
-       - The processor is vulnerable, but no mitigation enabled
+  * - 'Not affected'
+    - The processor is not vulnerable.
+
+  * - 'KVM: Mitigation: Split huge pages'
+    - Software changes mitigate this issue.
+
+  * - 'KVM: Mitigation: VMX unsupported'
+    - KVM is not vulnerable because Virtual Machine Extensions (VMX) is not
+      supported.
+
+  * - 'KVM: Mitigation: VMX disabled'
+    - KVM is not vulnerable because Virtual Machine Extensions (VMX) is
+      disabled.
+
+  * - 'KVM: Vulnerable'
+    - The processor is vulnerable, but no mitigation enabled.
 
 
 Enumeration of the erratum
Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst +40 -32

87 lines not on this page · raw message

Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst +15 -12
index 0585d02b9a6c..00bcc0424980 100644
@@ -82,21 +82,24 @@ The Linux kernel provides a sysfs interface to enumerate the current
 vulnerability status of the system: whether the system is vulnerable, and
 which mitigations are active. The relevant sysfs file is:
 
-	/sys/devices/system/cpu/vulnerabilities/reg_file_data_sampling
+  /sys/devices/system/cpu/vulnerabilities/reg_file_data_sampling
 
 The possible values in this file are:
 
-  .. list-table::
-
-     * - 'Not affected'
-       - The processor is not vulnerable
-     * - 'Vulnerable'
-       - The processor is vulnerable, but no mitigation enabled
-     * - 'Vulnerable: No microcode'
-       - The processor is vulnerable but microcode is not updated.
-     * - 'Mitigation: Clear Register File'
-       - The processor is vulnerable and the CPU buffer clearing mitigation is
-	 enabled.
+.. list-table::
+
+  * - 'Not affected'
+    - The processor is not vulnerable.
+
+  * - 'Vulnerable'
+    - The processor is vulnerable, but no mitigation enabled.
+
+  * - 'Vulnerable: No microcode'
+    - The processor is vulnerable but microcode is not updated.
+
+  * - 'Mitigation: Clear Register File'
+    - The processor is vulnerable and the CPU buffer clearing mitigation is
+      enabled.
 
 References
 ----------
Documentation/admin-guide/hw-vuln/special-register-buffer-data-sampling.rst +23 -16
index 966c9b3296ea..5b8c4e816e9e 100644
@@ -122,25 +122,32 @@ SRBDS System Information
 ------------------------
 The Linux kernel provides vulnerability status information through sysfs.  For
 SRBDS this can be accessed by the following sysfs file:
-/sys/devices/system/cpu/vulnerabilities/srbds
+
+  /sys/devices/system/cpu/vulnerabilities/srbds
 
 The possible values contained in this file are:
 
- ============================== =============================================
- Not affected                   Processor not vulnerable
- Vulnerable                     Processor vulnerable and mitigation disabled
- Vulnerable: No microcode       Processor vulnerable and microcode is missing
-                                mitigation
- Mitigation: Microcode          Processor is vulnerable and mitigation is in
-                                effect.
- Mitigation: TSX disabled       Processor is only vulnerable when TSX is
-                                enabled while this system was booted with TSX
-                                disabled.
- Unknown: Dependent on
- hypervisor status              Running on virtual guest processor that is
-                                affected but with no way to know if host
-                                processor is mitigated or vulnerable.
- ============================== =============================================
+.. list-table::
+
+  * - 'Not affected'
+    - Processor not vulnerable.
+
+  * - 'Vulnerable'
+    - Processor vulnerable and mitigation disabled.
+
+  * - 'Vulnerable: No microcode'
+    - Processor vulnerable and microcode is missing mitigation.
+
+  * - 'Mitigation: Microcode'
+    - Processor is vulnerable and mitigation is in effect.
+
+  * - 'Mitigation: TSX disabled'
+    - Processor is only vulnerable when TSX is enabled while this system was
+      booted with TSX disabled.
+
+  * - 'Unknown: Dependent on hypervisor status'
+    - Running on virtual guest processor that is affected but with no way to
+      know if host processor is mitigated or vulnerable.
 
 SRBDS Default mitigation
 ------------------------
Documentation/admin-guide/hw-vuln/spectre.rst +93 -56

196 lines not on this page · raw message

Documentation/admin-guide/hw-vuln/srso.rst +38 -43

105 lines not on this page · raw message

Documentation/admin-guide/hw-vuln/tsx_async_abort.rst +29 -23

63 lines not on this page · raw message

--
2.34.1

Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Takahiro Itazuri

The format for vulnerability sysfs files was diverge across pages.

Unifies the format as follows:

* Use list table for possible values for the sysfs files, because simple table does not allow line breaks for the first column; otherwise recognized as multiple different rows

Quoted 8 lines

* Insert 2-spaces indentation before a sysfs path

* Wrap each possible value with single quotes

* End description with a full stop

* Apply 80 columns rule

LGTM, thanks!

Signature · 1 line
An old man doll... just what I always wanted! - Clara