Re: [PATCH v4 6/6] x86/microcode/intel: Print when early microcode loading fails

From: Ashok Raj
Date: Tue Jan 17 2023 - 15:21:57 EST


On Tue, Jan 17, 2023 at 10:32:50AM -0800, Dave Hansen wrote:
> On 1/17/23 10:21, Borislav Petkov wrote:
> > On Tue, Jan 17, 2023 at 08:29:28AM -0800, Dave Hansen wrote:
> >> This ensures that a message of some kind is printed on all early loads:
> >> successes *and* failures. This should make it easier for our hapless
> >> users to figure out when a failure occurred.
> > I'm still not convinced. When something doesn't happen in the kernel, we don't
> > always say "It didn't happen". We don't say anything.
>
> Well, we have an awful lot of pr_warn()'s in the kernel that talk about
> something that was tried and failed.
>
> > So I don't like all those talkative drivers for no good reason. If there wasn't
> > an update message, then no update happened. That's it.
>
> I actually kinda like the inverse.
>
> The common (boring) case where an update was needed and was successful.
> It's the one we don't need to tell users about at all. It barely

I think its useful to know what microcode was loaded at FIT from BIOS and
what its updated to from initrd. We have been telling about successful
updates, no good reason to nuke that.

We added successful and failures on late-loads, so its better to be
consistent for both early and late.


> deserves a message. Users expect that if there's an early update
> available, it'll get attempted, it will be successful and the kernel
> won't say much.
>
> The time we need to spam dmesg is when something upends user
> expectations and they might need to go do something. An early loading
> failure is exactly the place where they want to know. They want to know
> if they're running with known CPU bugs that would have been fixed by the
> early update, or if they somehow have a botched early loading image.
>
> So, if I had to pick either:
>
> * Print on failure
> or
> * Print on success
>
> I'd pick failure. But, considering that we're already printing on
> success, I'm OK doing both.

That sounds good, lets do on both.