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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  7 Apr 2020 00:33:45 -0600
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     linux-kernel@...r.kernel.org, linux-edac@...r.kernel.org,
        x86@...nel.org, arnd@...db.de, srinivas.pandruvada@...ux.intel.com,
        bberg@...hat.com, bp@...e.de
Cc:     "Jason A. Donenfeld" <Jason@...c4.com>
Subject: [PATCH 3/3] x86/mce/therm_throt: allow disabling the thermal vector altogether

The thermal IRQ handler uses 1.21% CPU on my system when it's hot from
compiling things. Indeed looking at /proc/interrupts reveals quite a lot
of events coming in. Beyond logging them, the existing drivers on the
system don't appear to do very much that I'm interested in. So, add a
way to disable this entirely so that I can regain precious CPU cycles.

Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
---
 arch/x86/Kconfig                | 4 ++++
 arch/x86/kernel/cpu/mce/intel.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 39e7444353af..3125a11932f2 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1157,7 +1157,11 @@ config X86_MCE_INJECT
 
 config X86_THERMAL_VECTOR
 	def_bool y
+	prompt "Machine check thermal vector"
 	depends on X86_MCE_INTEL
+	---help---
+	  Provide support for capturing thermal events, logging them, and
+	  passing them off to other drivers.
 
 config X86_MCE_THERMAL_VERBOSE
 	bool "Verbose logging for thermal events"
diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c
index f996ffb887bc..d14f1922fb49 100644
--- a/arch/x86/kernel/cpu/mce/intel.c
+++ b/arch/x86/kernel/cpu/mce/intel.c
@@ -511,7 +511,8 @@ static void intel_ppin_init(struct cpuinfo_x86 *c)
 
 void mce_intel_feature_init(struct cpuinfo_x86 *c)
 {
-	intel_init_thermal(c);
+	if (IS_ENABLED(CONFIG_X86_THERMAL_VECTOR))
+		intel_init_thermal(c);
 	intel_init_cmci();
 	intel_init_lmce();
 	intel_ppin_init(c);
-- 
2.26.0

Powered by blists - more mailing lists