Re: [PATCH] x86/microcode: Fix crashes on early 486 CPUs due to usage of 'cpuid'.
From: Borislav Petkov
Date: Mon Apr 07 2025 - 10:00:44 EST
On Tue, Apr 08, 2025 at 12:21:50AM +1000, Kevin Koster wrote:
> To rephrase: I like knowing that "CONFIG_M486=y" works, in the kernel
> configuration. If not, then I know to use other OSs if I want to boot a
> 486.
Lemme put it this way: off and on the topic about removing 32-bit support
altogether comes up but we never go through with it. One day we might though.
:-)
> For email/news every morning, then a (newer) laptop afterwards.
Oh boy.
> --- a/arch/x86/kernel/cpu/microcode/amd.c
> +++ b/arch/x86/kernel/cpu/microcode/amd.c
> @@ -1093,7 +1093,7 @@
>
> static int __init save_microcode_in_initrd(void)
> {
> - unsigned int cpuid_1_eax = native_cpuid_eax(1);
> + unsigned int cpuid_1_eax;
> struct cpuinfo_x86 *c = &boot_cpu_data;
> struct cont_desc desc = { 0 };
> enum ucode_state ret;
> @@ -1102,6 +1102,8 @@
> if (microcode_loader_disabled() || c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10)
> return 0;
>
> + cpuid_1_eax = native_cpuid_eax(1);
> +
> if (!find_blobs_in_containers(&cp))
> return -EINVAL;
Yah, thanks. I must be going blind. :-(
It is all clear now - I'll run the fix on my machines some more and then post
a proper patch.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette