Re: Builtin microcode does nothing..

From: Borislav Petkov
Date: Sat May 21 2016 - 03:51:43 EST


On Sat, May 21, 2016 at 04:59:15AM +0200, Gabriel C wrote:
> Should this check not be the other way around ?

Actually, I've changed it to this:

/* try built-in microcode first */
if (load_builtin_intel_microcode(&cd))
/*
* clear start as we might've gotten an initrd too supplied by
* the boot loader, by mistake or simply forgotten there. That's
* fine, we ignore it since we've found builtin microcode.
*/
start = 0;
else {
#ifdef CONFIG_BLK_DEV_INITRD
static __initdata char ucode_name[] = "kernel/x86/microcode/GenuineIntel.bin";
char *p = IS_ENABLED(CONFIG_X86_32) ? (char *)__pa_nodebug(ucode_name)
: ucode_name;

cd = find_cpio_data(p, (void *)start, size, NULL);
if (!cd.data)
#endif
return UCODE_ERROR;
}

so we're trying the built-in microcode first.

Why, you ask?

Well, I'm following the intention here - the user has gone the length
and has explicitly configured builtin microcode into the kernel and
therefore we're looking for it first.

If we don't find it, we fall back to initrd. This way, even if you have
an initrd forgotten in the bootloader, we ignore it.

I'll ping you once I'm done testing here.

--
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix ImendÃrffer, Jane Smithard, Graham Norton, HRB 21284 (AG NÃrnberg)
--