]> git.baikalelectronics.ru Git - kernel.git/commit
x86/microcode/intel: Fix initrd loading with CONFIG_RANDOMIZE_MEMORY=y
authorBorislav Petkov <bp@suse.de>
Tue, 26 Jul 2016 09:51:38 +0000 (11:51 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 26 Jul 2016 17:32:57 +0000 (19:32 +0200)
commitd9f212d16c7a86d5d9754ef982c090334d413488
tree13ab8f1c60d3877a25152a4245398d27c8bab317
parent21180ca1ebb011320c7169407e1f9300cdb96525
x86/microcode/intel: Fix initrd loading with CONFIG_RANDOMIZE_MEMORY=y

CONFIG_RANDOMIZE_MEMORY=y randomizes the physical memmap and thus the
address where the initrd is located. Therefore, we need to add the
offset KASLR put us to in order to find the initrd again on the AP path.

In the future, we will get rid of the initrd address caching and query
the address on both the BSP and AP paths but that would need more work.

Thanks to Nicolai Stange for the good bisection and debugging work.

Reported-and-tested-by: Nicolai Stange <nicstange@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
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>
Link: http://lkml.kernel.org/r/20160726095138.3470-1-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/microcode/intel.c