lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20260119074118.835922-1-tianyaxiong@kylinos.cn>
Date: Mon, 19 Jan 2026 15:41:18 +0800
From: Yaxiong Tian <tianyaxiong@...inos.cn>
To: srinivas.pandruvada@...ux.intel.com,
	lenb@...nel.org,
	rafael@...nel.org,
	viresh.kumar@...aro.org,
	ricardo.neri-calderon@...ux.intel.com
Cc: linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Yaxiong Tian <tianyaxiong@...inos.cn>
Subject: [PATCH] cpufreq: intel_pstate: Disable SMT when hybrid systems are enabled

When hwp_is_hybrid && !sched_smt_active(), the driver enables
hybrid_capacity_scale and disables ITMT. According to the original code
logic, these related actions are one-time operations; therefore, I
believe the original design intent did not support dynamic runtime
switching.

However, SMT can be toggled via related interfaces in /sys. When SMT is
enabled, the system is no longer hybrid, and the original settings become
incorrect.

To resolve this confusion, permanently disable SMT by calling
cpuhp_smt_disable().

Fixes: 929ebc93ccaa ("cpufreq: intel_pstate: Set asymmetric CPU capacity on hybrid systems")
Signed-off-by: Yaxiong Tian <tianyaxiong@...inos.cn>
---
 drivers/cpufreq/intel_pstate.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index ec4abe374573..d0274a3ece2d 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1163,6 +1163,11 @@ static void hybrid_init_cpu_capacity_scaling(bool refresh)
 	 */
 	if (hwp_is_hybrid && !sched_smt_active() && arch_enable_hybrid_capacity_scale()) {
 		hybrid_refresh_cpu_capacity_scaling();
+		/*
+		 * Permanently disable SMT to prevent confusion caused by users
+		 * enabling SMT via /sys.
+		 */
+		cpuhp_smt_disable(CPU_SMT_FORCE_DISABLED);
 		/*
 		 * Disabling ITMT causes sched domains to be rebuilt to disable asym
 		 * packing and enable asym capacity and EAS.
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ