[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241031-x86_bugs_last_v2-v2-0-b7ff1dab840e@debian.org>
Date: Thu, 31 Oct 2024 04:06:15 -0700
From: Breno Leitao <leitao@...ian.org>
To: Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
Peter Zijlstra <peterz@...radead.org>, Josh Poimboeuf <jpoimboe@...nel.org>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
Jonathan Corbet <corbet@....net>
Cc: linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
Breno Leitao <leitao@...ian.org>
Subject: [PATCH v2 0/2] x86/bugs: default spectre_v2_user_cmd depends on
Kconfig
This series contains two patches that improve the handling of Spectre v2
user mitigations in the x86 architecture:
1. Make spectre_v2_user_cmd default depend on Kconfig
2. Simplify spectre_v2_user_select_mitigation() using cpu_smt_possible()
The first patch was originally part of a larger patchset [1] but was
removed in version 3 [2] to simplify the revision process. Now that the
original patchset has been merged, I am resubmitting this patch
separately.
This patch aligns the default configuration of spectre_v2_user_cmd with
CONFIG_MITIGATION_SPECTRE_V2, consistent with other user-selectable
mitigations.
The other patch is a simple optimization that leverages the
cpu_smt_possible() helper function to simplify the code in
spectre_v2_user_select_mitigation().
Together, these changes improve code consistency and simplify the
configuration and selection of Spectre v2 user mitigations.
[1] https://lore.kernel.org/all/20240118173213.2008115-4-leitao@debian.org/
[2] https://lore.kernel.org/all/20240422165830.2142904-1-leitao@debian.org/
Changelog:
v2:
* Added the documentation bits in kernel-parameters.txt, as suggested
by Pawan.
v1:
* https://lore.kernel.org/all/20241015105107.496105-1-leitao@debian.org/#r
Signed-off-by: Breno Leitao <leitao@...ian.org>
---
Breno Leitao (2):
x86/bugs: Use cpu_smt_possible helper
x86/bugs: spectre user default must depend on MITIGATION_SPECTRE_V2
Documentation/admin-guide/kernel-parameters.txt | 2 ++
arch/x86/kernel/cpu/bugs.c | 17 ++++++++---------
2 files changed, 10 insertions(+), 9 deletions(-)
---
base-commit: 81983758430957d9a5cb3333fe324fd70cf63e7e
change-id: 20241031-x86_bugs_last_v2-adf8f107fd1e
Best regards,
--
Breno Leitao <leitao@...ian.org>
Powered by blists - more mailing lists