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: <174368722144.30396.10503289275192821137.tip-bot2@tip-bot2>
Date: Thu, 03 Apr 2025 13:33:41 -0000
From: "tip-bot2 for Sohil Mehta" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Sohil Mehta <sohil.mehta@...el.com>, Ingo Molnar <mingo@...nel.org>,
 Kai Huang <kai.huang@...el.com>,
 "Peter Zijlstra (Intel)" <peterz@...radead.org>,
 Nikolay Borisov <nik.borisov@...e.com>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: x86/nmi] x86/nmi: Fix comment in unknown_nmi_error()

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

Commit-ID:     b4bc3144c1eca9107f45018000a1e68bfd308d8c
Gitweb:        https://git.kernel.org/tip/b4bc3144c1eca9107f45018000a1e68bfd308d8c
Author:        Sohil Mehta <sohil.mehta@...el.com>
AuthorDate:    Thu, 27 Mar 2025 23:46:25 
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Tue, 01 Apr 2025 22:26:11 +02:00

x86/nmi: Fix comment in unknown_nmi_error()

The comment in unknown_nmi_error() is incorrect and misleading. There
is no longer a restriction on having a single Unknown NMI handler. Also,
nmi_handle() never used the 'b2b' parameter.

The commits that made the comment outdated are:

  0d443b70cc92 ("x86/platform: Remove warning message for duplicate NMI handlers")
  bf9f2ee28d47 ("x86/nmi: Remove the 'b2b' parameter from nmi_handle()")

Remove the old comment and update it to reflect the current logic.

Signed-off-by: Sohil Mehta <sohil.mehta@...el.com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Reviewed-by: Kai Huang <kai.huang@...el.com>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Nikolay Borisov <nik.borisov@...e.com>
Link: https://lore.kernel.org/r/20250327234629.3953536-6-sohil.mehta@intel.com
---
 arch/x86/kernel/nmi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index cdfb386..2a07c9a 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -327,10 +327,9 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
 	int handled;
 
 	/*
-	 * Use 'false' as back-to-back NMIs are dealt with one level up.
-	 * Of course this makes having multiple 'unknown' handlers useless
-	 * as only the first one is ever run (unless it can actually determine
-	 * if it caused the NMI)
+	 * As a last resort, let the "unknown" handlers make a
+	 * best-effort attempt to figure out if they can claim
+	 * responsibility for this Unknown NMI.
 	 */
 	handled = nmi_handle(NMI_UNKNOWN, regs);
 	if (handled) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ