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: <20250407095848.7933a358c9f450fe03fb8234@ombertech.com>
Date: Mon, 7 Apr 2025 09:58:48 +1000
From: Kevin Koster <lkml@...ertech.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Thomas Gleixner <tglx@...utronix.de>, Oerg866 <oerg866@...glemail.com>,
 linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>, Dave Hansen
 <dave.hansen@...ux.intel.com>, x86@...nel.org, "H. Peter Anvin"
 <hpa@...or.com>
Subject: Re: [PATCH] x86/microcode: Fix crashes on early 486 CPUs due to
 usage of 'cpuid'.

On Sun, 6 Apr 2025 21:02:53 +0200
Borislav Petkov <bp@...en8.de> wrote:

> On Sun, Apr 06, 2025 at 05:46:33PM +1000, Kevin Koster wrote:
> > But if I move "cpuid_1_eax = native_cpuid_eax(1);" to after the
> > microcode_loader_disabled() check in amd.c, like in the first
> > patch, it boots fine!
> 
> Yeah, I noticed that too last night. Here's a hopefully better
> version after I ran it on my 32-bit Atom - I don't have your old rust

There is the 86box emulator which Eric Voirin suggested before for
reproducing this issue, although that adds the uncertainty of whether
the emulator matches real hardware behaviour.

> and maybe you should simply throw it in the garbage - that thing is
> probably not worth the electricity it uses to power up... :-)

Well my testing modern Linux on 486s was originally prompted by people
on the Tiny Core Linux forums finding compatibility issues with old
PCs. But I like to know Linux really works on the hardware it's built
for, and I'm not much better, writing this now on a Pentium 1.

[snip]
> diff --git a/arch/x86/kernel/cpu/microcode/amd.c
> b/arch/x86/kernel/cpu/microcode/amd.c index
> b61028cf5c8a..dda7f0d409e9 100644
> --- a/arch/x86/kernel/cpu/microcode/amd.c
> +++ b/arch/x86/kernel/cpu/microcode/amd.c
> @@ -1099,7 +1099,7 @@ static int __init save_microcode_in_initrd(void)
>  	enum ucode_state ret;
>  	struct cpio_data cp;
>  
> -	if (dis_ucode_ldr || c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10)
> +	if (microcode_loader_disabled() || c->x86_vendor != X86_VENDOR_AMD || c->x86 < 0x10)
		return 0;

Still fails unless the native_cpuid_eax(1) call is moved under here. After that
change, it boots fine.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ