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: <174602650759.22196.2016156297642927611.tip-bot2@tip-bot2>
Date: Wed, 30 Apr 2025 15:21:47 -0000
From: "tip-bot2 for Annie Li" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Annie Li <jiayanli@...gle.com>, "Borislav Petkov (AMD)" <bp@...en8.de>,
 x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/microcode] x86/microcode/AMD: Do not return error when
 microcode update is not necessary

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

Commit-ID:     b43dc4ab097859c24e2a6993119c927cffc856aa
Gitweb:        https://git.kernel.org/tip/b43dc4ab097859c24e2a6993119c927cffc856aa
Author:        Annie Li <jiayanli@...gle.com>
AuthorDate:    Wed, 30 Apr 2025 05:34:24 
Committer:     Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Wed, 30 Apr 2025 17:10:46 +02:00

x86/microcode/AMD: Do not return error when microcode update is not necessary

After

  6f059e634dcd("x86/microcode: Clarify the late load logic"),

if the load is up-to-date, the AMD side returns UCODE_OK which leads to
load_late_locked() returning -EBADFD.

Handle UCODE_OK in the switch case to avoid this error.

  [ bp: Massage commit message. ]

Fixes: 6f059e634dcd ("x86/microcode: Clarify the late load logic")
Signed-off-by: Annie Li <jiayanli@...gle.com>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Link: https://lore.kernel.org/20250430053424.77438-1-jiayanli@google.com
---
 arch/x86/kernel/cpu/microcode/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index b3658d1..2309321 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -686,6 +686,8 @@ static int load_late_locked(void)
 		return load_late_stop_cpus(true);
 	case UCODE_NFOUND:
 		return -ENOENT;
+	case UCODE_OK:
+		return 0;
 	default:
 		return -EBADFD;
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ