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] [day] [month] [year] [list]
Message-ID: <171343074601.10875.15730658639010324110.tip-bot2@tip-bot2>
Date: Thu, 18 Apr 2024 08:59:06 -0000
From: "tip-bot2 for Hou Wenlong" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Hou Wenlong <houwenlong.hwl@...group.com>,
 "Borislav Petkov (AMD)" <bp@...en8.de>,
 "H. Peter Anvin (Intel)" <hpa@...or.com>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: x86/urgent] x86/fred: Fix incorrect error code printout in
 fred_bad_type()

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

Commit-ID:     a4b37f5033fa812f02f3b7bd1242393d347ba791
Gitweb:        https://git.kernel.org/tip/a4b37f5033fa812f02f3b7bd1242393d347ba791
Author:        Hou Wenlong <houwenlong.hwl@...group.com>
AuthorDate:    Wed, 17 Apr 2024 19:34:25 +08:00
Committer:     Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Thu, 18 Apr 2024 10:47:17 +02:00

x86/fred: Fix incorrect error code printout in fred_bad_type()

regs->orig_ax has been set to -1 on entry so in the printout,
fred_bad_type() should use the passed parameter error_code.

Fixes: 14619d912b65 ("x86/fred: FRED entry/exit and dispatch code")
Signed-off-by: Hou Wenlong <houwenlong.hwl@...group.com>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Acked-by: H. Peter Anvin (Intel) <hpa@...or.com>
Link: https://lore.kernel.org/r/b2a8f0a41449d25240e314a2ddfbf6549511fb04.1713353612.git.houwenlong.hwl@antgroup.com
---
 arch/x86/entry/entry_fred.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/entry/entry_fred.c b/arch/x86/entry/entry_fred.c
index 9fa18b8..89c1476 100644
--- a/arch/x86/entry/entry_fred.c
+++ b/arch/x86/entry/entry_fred.c
@@ -28,9 +28,9 @@ static noinstr void fred_bad_type(struct pt_regs *regs, unsigned long error_code
 	if (regs->fred_cs.sl > 0) {
 		pr_emerg("PANIC: invalid or fatal FRED event; event type %u "
 			 "vector %u error 0x%lx aux 0x%lx at %04x:%016lx\n",
-			 regs->fred_ss.type, regs->fred_ss.vector, regs->orig_ax,
+			 regs->fred_ss.type, regs->fred_ss.vector, error_code,
 			 fred_event_data(regs), regs->cs, regs->ip);
-		die("invalid or fatal FRED event", regs, regs->orig_ax);
+		die("invalid or fatal FRED event", regs, error_code);
 		panic("invalid or fatal FRED event");
 	} else {
 		unsigned long flags = oops_begin();
@@ -38,10 +38,10 @@ static noinstr void fred_bad_type(struct pt_regs *regs, unsigned long error_code
 
 		pr_alert("BUG: invalid or fatal FRED event; event type %u "
 			 "vector %u error 0x%lx aux 0x%lx at %04x:%016lx\n",
-			 regs->fred_ss.type, regs->fred_ss.vector, regs->orig_ax,
+			 regs->fred_ss.type, regs->fred_ss.vector, error_code,
 			 fred_event_data(regs), regs->cs, regs->ip);
 
-		if (__die("Invalid or fatal FRED event", regs, regs->orig_ax))
+		if (__die("Invalid or fatal FRED event", regs, error_code))
 			sig = 0;
 
 		oops_end(flags, regs, sig);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ