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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241203075119.584419-2-rui.zhang@intel.com>
Date: Tue,  3 Dec 2024 15:51:16 +0800
From: Zhang Rui <rui.zhang@...el.com>
To: rafael.j.wysocki@...el.com,
	lenb@...nel.org
Cc: linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org
Subject: [PATCH 1/4] tools/power turbostat: Exit on unsupported Intel models

Turbostat requires per-platform enabling for Intel CPU models due to
platform-specific features. When running on unsupported Intel CPU
models, turbostat currently operates with limited default features,
which can lead to users unknowingly using an outdated version of the
tool.

Enhance turbostat to exit by default when run on unsupported Intel CPU
models, with a clear message to users, informing them that their CPU
model is not supported and advising them to update to the latest version
of turbostat for full functionality.

Signed-off-by: Zhang Rui <rui.zhang@...el.com>
---
 tools/power/x86/turbostat/turbostat.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index e203f109dd2e..bb65c5e1273c 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -1079,6 +1079,13 @@ void probe_platform_features(unsigned int family, unsigned int model)
 			return;
 		}
 	}
+
+	fprintf(stderr, "Unsupported platform detected.\n"
+		"\tTo get latest turbostat support, please contact\n"
+		"\t   lenb@...nel.org\n"
+		"\tor pull from\n"
+		"\t   https://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git turbostat\n");
+	exit(1);
 }
 
 /* Model specific support End */
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ