diff options
| author | Borislav Petkov <bp@suse.de> | 2016-07-27 08:09:39 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-07-27 08:59:59 -0400 |
| commit | 4a1a8e1b8f9f37bdbba416eb0a5ff3f47d31cb28 (patch) | |
| tree | 7e19f6082162f89cfa5edb8b82f365595f88afa8 /arch/x86/kernel/cpu/microcode | |
| parent | df15929f8f5c69e987c31bf016eca4a38dba46f0 (diff) | |
x86/asm, x86/microcode: Add __PAGE_OFFSET_BASE define on 32-bit
... in order to avoid #ifdeffery in code computing the ASLR randomization
offset. Remove that #ifdeffery in the microcode loader.
Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nicolai Stange <nicstange@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Garnier <thgarnie@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20160727120939.GA18911@nazgul.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/microcode')
| -rw-r--r-- | arch/x86/kernel/cpu/microcode/intel.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c index 0f97ae93441b..cdc0deab00c9 100644 --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c | |||
| @@ -818,13 +818,11 @@ void load_ucode_intel_ap(void) | |||
| 818 | if (blobs_p->valid) { | 818 | if (blobs_p->valid) { |
| 819 | start = blobs_p->start; | 819 | start = blobs_p->start; |
| 820 | 820 | ||
| 821 | #ifdef CONFIG_RANDOMIZE_MEMORY | ||
| 822 | /* | 821 | /* |
| 823 | * Pay attention to CONFIG_RANDOMIZE_MEMORY=y as it shuffles | 822 | * Pay attention to CONFIG_RANDOMIZE_MEMORY=y as it shuffles |
| 824 | * physmem mapping too and there we have the initrd. | 823 | * physmem mapping too and there we have the initrd. |
| 825 | */ | 824 | */ |
| 826 | start += PAGE_OFFSET - __PAGE_OFFSET_BASE; | 825 | start += PAGE_OFFSET - __PAGE_OFFSET_BASE; |
| 827 | #endif | ||
| 828 | } | 826 | } |
| 829 | 827 | ||
| 830 | collect_cpu_info_early(&uci); | 828 | collect_cpu_info_early(&uci); |
