summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2016-06-06 18:10:42 +0300
committerIngo Molnar <mingo@kernel.org>2016-06-08 12:04:19 +0300
commit6c5456474e7f0b63be66d44b0595001e2a8b44d5 (patch)
tree8846afb508f17b7da1cda7704cd9d89c6eb709bf /lib
parentc8ae067f2635be0f8c7e5db1bb74b757d623e05b (diff)
downloadlinux-6c5456474e7f0b63be66d44b0595001e2a8b44d5.tar.xz
x86/microcode: Fix loading precedence
So it can happen that even with builtin microcode, CONFIG_BLK_DEV_INITRD=y gets forgotten enabled. Or, even with that disabled, an initrd image gets supplied by the boot loader, by omission or is simply forgotten there. And since we do look at boot_params.hdr.ramdisk_* to know whether we have received an initrd, we might get puzzled. So let's just make the loader look for builtin microcode first and if found, ignore the ramdisk image. If no builtin found, it falls back to scanning the supplied initrd, of course. For that, we move all the initrd scanning in a separate __scan_microcode_initrd() function and fall back to it only if load_builtin_intel_microcode() has failed. Reported-and-tested-by: Gabriel Craciunescu <nix.or.die@gmail.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1465225850-7352-2-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions