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-next>] [day] [month] [year] [list]
Message-ID: <AANLkTikLveTej7m7UkT6thCxD_nWbEFbF6q=ayGSj2oT@mail.gmail.com>
Date:	Thu, 3 Feb 2011 23:07:11 +0800
From:	Hillf Danton <dhillf@...il.com>
To:	x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] x86: fix setup NMI_LOCAL_APIC watchdog

when testing NMI watchdog, at leat for NMI_LOCAL_APIC, the default
value of nmi_active could prevent the dog from being tested. Even
could not, lapic_adjust_nmi_hz() could misplay its role since the
underlying hardware is still not initialized by lapic_watchdog_init().

And for same reason the check for wd_ops could be removed in
enable_lapic_nmi_watchdog(), in which nmi_active is also checked.

If NMI_LOCAL_APIC is enabled thru sysctl on cmdline after bootup, how
to test stuckup?

Signed-off-by: Hillf Danton <dhillf@...il.com>
---

--- a/arch/x86/kernel/apic/nmi.c	2011-01-05 08:50:20.000000000 +0800
+++ b/arch/x86/kernel/apic/nmi.c	2011-02-03 22:51:42.000000000 +0800
@@ -171,7 +171,7 @@ int __init check_nmi_watchdog(void)
 	 * something more reasonable; makes a difference in some configs
 	 */
 	if (nmi_watchdog == NMI_LOCAL_APIC)
-		nmi_hz = lapic_adjust_nmi_hz(1);
+		nmi_hz = 1;

 	kfree(prev_nmi_count);
 	return 0;
--- a/arch/x86/kernel/cpu/perfctr-watchdog.c	2011-01-05 08:50:20.000000000 +0800
+++ b/arch/x86/kernel/cpu/perfctr-watchdog.c	2011-02-03 22:48:44.000000000 +0800
@@ -196,14 +196,6 @@ void enable_lapic_nmi_watchdog(void)
 	if (atomic_read(&nmi_active) != 0)
 		return;

-	/* are we lapic aware */
-	if (!wd_ops)
-		return;
-	if (!wd_ops->reserve()) {
-		printk(KERN_ERR "NMI watchdog: cannot reserve perfctrs\n");
-		return;
-	}
-
 	on_each_cpu(setup_apic_nmi_watchdog, NULL, 1);
 	touch_nmi_watchdog();
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ