[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241114101655.GEZzXOFwoVyizZUNx6@fat_crate.local>
Date: Thu, 14 Nov 2024 11:16:55 +0100
From: Borislav Petkov <bp@...en8.de>
To: Nikolay Borisov <nik.borisov@...e.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] x86/microcode/AMD: Return bool from
find_blobs_in_containers()
On Fri, Oct 18, 2024 at 06:51:49PM +0300, Nikolay Borisov wrote:
> @@ -562,6 +562,7 @@ static void __init find_blobs_in_containers(struct cpio_data *ret)
> cp = find_microcode_in_initrd(ucode_path);
>
> *ret = cp;
> + return cp.data && cp.size;
I guess we want this here ontop:
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 41b6f8a9e7e6..dfad4b26a662 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -561,12 +561,16 @@ static bool get_builtin_microcode(struct cpio_data *cp)
static bool __init find_blobs_in_containers(struct cpio_data *ret)
{
struct cpio_data cp;
+ bool found;
if (!get_builtin_microcode(&cp))
cp = find_microcode_in_initrd(ucode_path);
- *ret = cp;
- return cp.data && cp.size;
+ found = cp.data && cp.size;
+ if (found)
+ *ret = cp;
+
+ return found;
}
void __init load_ucode_amd_bsp(struct early_load_data *ed, unsigned int cpuid_1_eax)
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists