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: <5A9651E8-AB49-4B8E-9B98-65708E8E8E4E@amazon.de>
Date:   Fri, 1 Dec 2023 19:56:59 +0000
From:   "Sironi, Filippo" <sironi@...zon.de>
To:     Tony Luck <tony.luck@...el.com>, "bp@...en8.de" <bp@...en8.de>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>
Subject: Re: [PATCH] x86/MCE: Get microcode revision from cpu_data instead of
 boot_cpu_data

> On Fri, Dec 01, 2023 at 11:23:27AM +0000, Filippo Sironi wrote:
>> Commit fa94d0c6e0f3 ("x86/MCE: Save microcode revision in machine check
>> records") extended MCE entries to report the microcode revision taken
>> from boot_cpu_data. Unfortunately, boot_cpu_data isn't updated on late
>> microcode loading, thus making MCE entries slightly incorrect. Use
>
> This code in intel.c:apply_microcode_late() looks like it tries to update
> boot_cpu_data:
>
>
> 466 cpu_data(cpu).microcode = uci->cpu_sig.rev;
> 467 if (!cpu)
> 468 boot_cpu_data.microcode = uci->cpu_sig.rev;
>
>
> Is that not working for some reason?

It is... I had this change in our tree for a long long while and just
realized that the issue of boot_cpu_data not being updated was addressed
with commit 370a132bb222 ("x86/microcode: Make sure
boot_cpu_data.microcode is up-to-date").

>> cpu_data instead, which is updated on late microcode loading. This also
>> fixes the corner case in which the microcode revision isn't coherent
>> across CPUs (which may happen on late microcode loading failure).
>
>
> But this does seem a worthwhile change to help diagnose things if late
> load is somehow only applied to some subset of CPUs.

Yes, but, as Boris points out:

>> But this does seem a worthwhile change to help diagnose things if late
>> load is somehow only applied to some subset of CPUs.
> 
> We already do that, see load_late_stop_cpus().

Boris, I just took a quick look and I might be missing something. If cores
fail to load the microcode or timeout, we taint the kernel, print an error
message, and then bubble up an error to userspace via:

load_late_stop_cpus
load_late_locked
reload_store

Right?

We would take servers that fail out of production; however, for others it might
be interesting to have the correct information. The patch - with a reworked
commit message - might still be useful to a few. 

Filippo





Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ