x86/microcode/AMD: Fix initrd loading with CONFIG_RANDOMIZE_MEMORY=y
authorBorislav Petkov <bp@alien8.de>
Wed, 17 Aug 2016 11:33:14 +0000 (13:33 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 18 Aug 2016 08:06:49 +0000 (10:06 +0200)
commit88b2f634028f1f38dcc3d412e10ff1f224976daa
treec2be232a02aee4e6b591249bed13d98256c86546
parent3684b03d8e9a889eda94ee74421959a9d55e5e19
x86/microcode/AMD: Fix initrd loading with CONFIG_RANDOMIZE_MEMORY=y

Similar to:

  efaad554b4ff ("x86/microcode/intel: Fix initrd loading with CONFIG_RANDOMIZE_MEMORY=y")

... fix microcode loading from the initrd on AMD by adding the
randomization offset to the microcode patch container within the initrd.

Reported-and-tested-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-tip-commits@vger.kernel.org
Link: http://lkml.kernel.org/r/20160817113314.GA19221@nazgul.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/microcode/amd.c