Re: [PATCH -v2] x86/microcode: Consolidate the loader enablement checking

From: Borislav Petkov
Date: Mon Apr 14 2025 - 07:27:06 EST


On Mon, Apr 14, 2025 at 12:48:59PM +0200, Ingo Molnar wrote:
> BTW., any objections against:
>
> s/dis_ucode_ldr
> /ucode_loader_disabled

Well, "dis_ucode_ldr" is the user-visible cmdline option. (I admit, it wasn't
a good choice back then but we had exposed it to luserspace already so there
was no turning back.).

So if I rename the internal var, there'll be a discrepancy:

if (cmdline_find_option_bool(boot_command_line, "dis_ucode_ldr") > 0)
loader_disabled = false;

And yeah, it doesn't need a "ucode_" or "microcode_" prefix as it is internal
var now.

So yeah, I guess that could work because the discrepancy will be at one place
only, at the parsin location.

An additional thing we could do - and since I'm fan of namespaces - we can
start supporting a "microcode=" cmdline in parallel and have it do

microcode=disable

with the same functionality. And "dis_ucode_ldr" will be deprecated and it'll
warn when people use it and will tell them to use "microcode=disable" and we
will phase it out after a loooong grace period (think years).

So yeah, something like that...

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette