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] [day] [month] [year] [list]
Message-ID: <170620050883.398.17609181357191094448.tip-bot2@tip-bot2>
Date: Thu, 25 Jan 2024 16:35:08 -0000
From: "tip-bot2 for Namhyung Kim" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Namhyung Kim <namhyung@...nel.org>, "Borislav Petkov (AMD)" <bp@...en8.de>,
 Ravi Bangoria <ravi.bangoria@....com>, Guilherme Amadio <amadio@...too.org>,
 Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: x86/misc] x86/nmi: Rate limit unknown NMI messages

The following commit has been merged into the x86/misc branch of tip:

Commit-ID:     e2fbc857d3c677ce96d9260577491e0d8f21b6f7
Gitweb:        https://git.kernel.org/tip/e2fbc857d3c677ce96d9260577491e0d8f21b6f7
Author:        Namhyung Kim <namhyung@...nel.org>
AuthorDate:    Fri, 08 Dec 2023 17:52:11 -08:00
Committer:     Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Thu, 25 Jan 2024 17:29:06 +01:00

x86/nmi: Rate limit unknown NMI messages

On some AMD machines, unknown NMI messages were printed on the console
continuously when using perf command with IBS.  It was reported that it
can slow down the kernel. Ratelimit the unknown NMI messages.

Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Acked-by: Ravi Bangoria <ravi.bangoria@....com>
Acked-by: Guilherme Amadio <amadio@...too.org>
Acked-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/r/20231209015211.357983-1-namhyung@kernel.org
---
 arch/x86/kernel/nmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index 17e955a..d238679 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -303,13 +303,13 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
 
 	__this_cpu_add(nmi_stats.unknown, 1);
 
-	pr_emerg("Uhhuh. NMI received for unknown reason %02x on CPU %d.\n",
-		 reason, smp_processor_id());
+	pr_emerg_ratelimited("Uhhuh. NMI received for unknown reason %02x on CPU %d.\n",
+			     reason, smp_processor_id());
 
 	if (unknown_nmi_panic || panic_on_unrecovered_nmi)
 		nmi_panic(regs, "NMI: Not continuing");
 
-	pr_emerg("Dazed and confused, but trying to continue\n");
+	pr_emerg_ratelimited("Dazed and confused, but trying to continue\n");
 }
 NOKPROBE_SYMBOL(unknown_nmi_error);
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ