From: David Kaplan <david.kaplan@amd.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
"H . Peter Anvin" <hpa@zytor.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH v5 00/20] Attack vector controls (part 2)
Date: Fri, 9 May 2025 11:28:19 -0500 [thread overview]
Message-ID: <20250509162839.3057217-1-david.kaplan@amd.com> (raw)
This is an updated version of the second half of the attack vector
series which adds new attack vector command line options designed to make
it easier to control which CPU mitigations are enabled.
The first half of this series focused on bugs.c restructuring and was
merged on May 2. Link:
https://lore.kernel.org/all/20250418161721.1855190-1-david.kaplan@amd.com/
Attack vector options are designed to make it easier to select appropriate
mitigations based on the usage of the system. While many users may not be
intimately familiar with the details of these CPU vulnerabilities, they are
likely better able to understand the intended usage of their system. As a
result, unneeded mitigations may be disabled, allowing users to recoup more
performance. New documentation is included with recommendations on what to
consider when choosing which attack vectors to enable/disable.
In this series, attack vector options are chosen using the mitigations=
command line. Attack vectors may be individually disabled such as
'mitigations=auto;no_user_kernel,no_user_user'. The 'mitigations=off'
option is equivalent to disabling all attack vectors. 'mitigations=off'
therefore disables all mitigations, unless bug-specific command line
options are used to re-enable some.
Note that this patch series does not change any of the existing
mitigation defaults.
Changes in v5:
- Updated table layout in documentation file
- Minor clean up
David Kaplan (20):
Documentation/x86: Document new attack vector controls
cpu: Define attack vectors
x86/Kconfig: Add arch attack vector support
x86/bugs: Define attack vectors relevant for each bug
x86/bugs: Add attack vector controls for MDS
x86/bugs: Add attack vector controls for TAA
x86/bugs: Add attack vector controls for MMIO
x86/bugs: Add attack vector controls for RFDS
x86/bugs: Add attack vector controls for SRBDS
x86/bugs: Add attack vector controls for GDS
x86/bugs: Add attack vector controls for spectre_v1
x86/bugs: Add attack vector controls for retbleed
x86/bugs: Add attack vector controls for spectre_v2_user
x86/bugs: Add attack vector controls for BHI
x86/bugs: Add attack vector controls for spectre_v2
x86/bugs: Add attack vector controls for L1TF
x86/bugs: Add attack vector controls for SRSO
x86/pti: Add attack vector controls for PTI
x86/bugs: Print enabled attack vectors
cpu: Show attack vectors in sysfs
.../hw-vuln/attack_vector_controls.rst | 236 +++++++++++++++
Documentation/admin-guide/hw-vuln/index.rst | 1 +
.../admin-guide/kernel-parameters.txt | 4 +
arch/Kconfig | 3 +
arch/x86/Kconfig | 1 +
arch/x86/kernel/cpu/bugs.c | 278 ++++++++++++++----
arch/x86/mm/pti.c | 4 +-
drivers/base/cpu.c | 67 +++++
include/linux/cpu.h | 21 ++
kernel/cpu.c | 130 +++++++-
10 files changed, 672 insertions(+), 73 deletions(-)
create mode 100644 Documentation/admin-guide/hw-vuln/attack_vector_controls.rst
base-commit: fd569ffb9ea03da78b1719ccee5bce34fa130fa7
--
2.34.1
next reply other threads:[~2025-05-09 16:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 16:28 David Kaplan [this message]
2025-05-09 16:28 ` [PATCH v5 01/20] Documentation/x86: Document new attack vector controls David Kaplan
2025-05-09 16:28 ` [PATCH v5 02/20] cpu: Define attack vectors David Kaplan
2025-05-21 15:28 ` Borislav Petkov
2025-05-09 16:28 ` [PATCH v5 03/20] x86/Kconfig: Add arch attack vector support David Kaplan
2025-05-09 16:28 ` [PATCH v5 04/20] x86/bugs: Define attack vectors relevant for each bug David Kaplan
2025-05-09 16:28 ` [PATCH v5 05/20] x86/bugs: Add attack vector controls for MDS David Kaplan
2025-05-09 16:28 ` [PATCH v5 06/20] x86/bugs: Add attack vector controls for TAA David Kaplan
2025-05-09 16:28 ` [PATCH v5 07/20] x86/bugs: Add attack vector controls for MMIO David Kaplan
2025-05-09 16:28 ` [PATCH v5 08/20] x86/bugs: Add attack vector controls for RFDS David Kaplan
2025-05-09 16:28 ` [PATCH v5 09/20] x86/bugs: Add attack vector controls for SRBDS David Kaplan
2025-05-09 16:28 ` [PATCH v5 10/20] x86/bugs: Add attack vector controls for GDS David Kaplan
2025-05-09 16:28 ` [PATCH v5 11/20] x86/bugs: Add attack vector controls for spectre_v1 David Kaplan
2025-05-09 16:28 ` [PATCH v5 12/20] x86/bugs: Add attack vector controls for retbleed David Kaplan
2025-05-09 16:28 ` [PATCH v5 13/20] x86/bugs: Add attack vector controls for spectre_v2_user David Kaplan
2025-05-09 16:28 ` [PATCH v5 14/20] x86/bugs: Add attack vector controls for BHI David Kaplan
2025-06-30 12:40 ` Borislav Petkov
2025-07-01 3:27 ` Kaplan, David
2025-07-01 11:45 ` Borislav Petkov
2025-07-02 18:24 ` Kaplan, David
2025-07-03 10:01 ` Borislav Petkov
2025-05-09 16:28 ` [PATCH v5 15/20] x86/bugs: Add attack vector controls for spectre_v2 David Kaplan
2025-05-09 16:28 ` [PATCH v5 16/20] x86/bugs: Add attack vector controls for L1TF David Kaplan
2025-05-09 16:28 ` [PATCH v5 17/20] x86/bugs: Add attack vector controls for SRSO David Kaplan
2025-05-09 16:28 ` [PATCH v5 18/20] x86/pti: Add attack vector controls for PTI David Kaplan
2025-05-09 16:28 ` [PATCH v5 19/20] x86/bugs: Print enabled attack vectors David Kaplan
2025-05-09 16:28 ` [PATCH v5 20/20] cpu: Show attack vectors in sysfs David Kaplan
2025-06-30 16:40 ` [PATCH v5 00/20] Attack vector controls (part 2) Borislav Petkov
2025-07-01 3:27 ` Kaplan, David
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250509162839.3057217-1-david.kaplan@amd.com \
--to=david.kaplan@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®