linux/Documentation/admin-guide/hw-vuln
Daniel Sneddon 553a5c03e9 x86/speculation: Add force option to GDS mitigation
The Gather Data Sampling (GDS) vulnerability allows malicious software
to infer stale data previously stored in vector registers. This may
include sensitive data such as cryptographic keys. GDS is mitigated in
microcode, and systems with up-to-date microcode are protected by
default. However, any affected system that is running with older
microcode will still be vulnerable to GDS attacks.

Since the gather instructions used by the attacker are part of the
AVX2 and AVX512 extensions, disabling these extensions prevents gather
instructions from being executed, thereby mitigating the system from
GDS. Disabling AVX2 is sufficient, but we don't have the granularity
to do this. The XCR0[2] disables AVX, with no option to just disable
AVX2.

Add a kernel parameter gather_data_sampling=force that will enable the
microcode mitigation if available, otherwise it will disable AVX on
affected systems.

This option will be ignored if cmdline mitigations=off.

This is a *big* hammer.  It is known to break buggy userspace that
uses incomplete, buggy AVX enumeration.  Unfortunately, such userspace
does exist in the wild:

	https://www.mail-archive.com/bug-coreutils@gnu.org/msg33046.html

[ dhansen: add some more ominous warnings about disabling AVX ]

Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
2023-07-21 12:59:49 -07:00
..
core-scheduling.rst uapi/linux/prctl: provide macro definitions for the PR_SCHED_CORE type argument 2021-09-29 13:00:05 +02:00
cross-thread-rsb.rst Documentation/hw-vuln: Fix rST warning 2023-02-15 07:24:23 -05:00
gather_data_sampling.rst x86/speculation: Add force option to GDS mitigation 2023-07-21 12:59:49 -07:00
index.rst x86/speculation: Add Gather Data Sampling mitigation 2023-07-19 16:45:37 -07:00
l1d_flush.rst Documentation: Add L1D flushing Documentation 2021-07-28 11:42:25 +02:00
l1tf.rst docs: add IRQ documentation at the core-api book 2020-05-15 12:00:56 -06:00
mds.rst docs: move x86 documentation into Documentation/arch/ 2023-03-30 12:58:51 -06:00
multihit.rst x86/bugs/multihit: Fix mitigation reporting when VMX is not in use 2020-08-07 01:32:00 +02:00
processor_mmio_stale_data.rst x86/bugs: Add "unknown" reporting for MMIO Stale Data 2022-08-18 15:35:22 +02:00
special-register-buffer-data-sampling.rst docs: admin-guide: hw-vuln: avoid using ReST :doc:foo markup 2021-06-17 13:24:36 -06:00
spectre.rst Documentation/hw-vuln: Document the interaction between IBRS and STIBP 2023-02-27 19:02:47 +01:00
tsx_async_abort.rst docs: move x86 documentation into Documentation/arch/ 2023-03-30 12:58:51 -06:00