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: <1479746119-25239-1-git-send-email-prarit@redhat.com>
Date:   Mon, 21 Nov 2016 11:35:19 -0500
From:   Prarit Bhargava <prarit@...hat.com>
To:     linux-kernel@...r.kernel.org
Cc:     Prarit Bhargava <prarit@...hat.com>, Borislav Petkov <bp@...e.de>,
        Tejun Heo <tj@...nel.org>, Don Zickus <dzickus@...hat.com>,
        Hidehiro Kawai <hidehiro.kawai.ez@...achi.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andi Kleen <ak@...ux.intel.com>,
        Joshua Hunt <johunt@...mai.com>, Ingo Molnar <mingo@...nel.org>
Subject: [PATCH] kernel/watchdog.c: Only output hw-PMU message once

When CONFIG_BOOTPARAM_HOTPLUG_CPU0 is enabled, the socket containing the
boot cpu can be replaced.  During the hot add event, the message

NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.

is output implying that the NMI was disabled at some point.  This is not the
case and the message has caused confusion for users of systems that support
socket removal.

This patch modifies the message so that it only outputs a single time
during runtime.

Signed-off-by: Prarit Bhargava <prarit@...hat.com>
Cc: Borislav Petkov <bp@...e.de>
Cc: Tejun Heo <tj@...nel.org>
Cc: Don Zickus <dzickus@...hat.com>
Cc: Hidehiro Kawai <hidehiro.kawai.ez@...achi.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Joshua Hunt <johunt@...mai.com>
Cc: Ingo Molnar <mingo@...nel.org>
---
 kernel/watchdog.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 9acb29f280ec..560414692c01 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -615,7 +615,7 @@ static int watchdog_nmi_enable(unsigned int cpu)
 	if (!IS_ERR(event)) {
 		/* only print for cpu0 or different than cpu0 */
 		if (cpu == 0 || cpu0_err)
-			pr_info("enabled on all CPUs, permanently consumes one hw-PMU counter.\n");
+			pr_info_once("enabled on all CPUs, permanently consumes one hw-PMU counter.\n");
 		goto out_save;
 	}
 
-- 
1.7.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ