x86/microcode/amd: Do not overwrite final patch levels
authorBorislav Petkov <bp@suse.de>
Mon, 12 Oct 2015 09:22:42 +0000 (11:22 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 12 Oct 2015 14:15:48 +0000 (16:15 +0200)
commit0399f73299f1b7e04de329050f7111b362b7eeb5
tree4774fc009e34c1a63397d7e16cddaddfd34adc7b
parent2eff73c0a11f19ff082a566e3429fbaaca7b8e7b
x86/microcode/amd: Do not overwrite final patch levels

A certain number of patch levels of applied microcode should not
be overwritten by the microcode loader, otherwise bad things
will happen.

Check those and abort update if the current core has one of
those final patch levels applied by the BIOS. 32-bit needs
special handling, of course.

See https://bugzilla.suse.com/show_bug.cgi?id=913996 for more
info.

Tested-by: Peter Kirchgeßner <pkirchgessner@t-online.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Borislav Petkov <bp@alien8.de>
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>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/1444641762-9437-7-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/microcode_amd.h
arch/x86/kernel/cpu/microcode/amd.c
arch/x86/kernel/cpu/microcode/amd_early.c