linux-stable/arch/x86/mm
Thomas Gleixner 1dddd25125 x86/kaslr: Fix the vaddr_end mess
vaddr_end for KASLR is only documented in the KASLR code itself and is
adjusted depending on config options. So it's not surprising that a change
of the memory layout causes KASLR to have the wrong vaddr_end. This can map
arbitrary stuff into other areas causing hard to understand problems.

Remove the whole ifdef magic and define the start of the cpu_entry_area to
be the end of the KASLR vaddr range.

Add documentation to that effect.

Fixes: 92a0f81d89 ("x86/cpu_entry_area: Move it out of the fixmap")
Reported-by: Benjamin Gilbert <benjamin.gilbert@coreos.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Benjamin Gilbert <benjamin.gilbert@coreos.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable <stable@vger.kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Garnier <thgarnie@google.com>,
Cc: Alexander Kuleshov <kuleshovmail@gmail.com>
Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801041320360.1771@nanos
2018-01-05 00:39:57 +01:00
..
kmemcheck License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
amdtopology.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpu_entry_area.c x86/cpu_entry_area: Add debugstore entries to cpu_entry_area 2017-12-23 21:13:00 +01:00
debug_pagetables.c x86/mm/dump_pagetables: Allow dumping current pagetables 2017-12-23 21:13:01 +01:00
dump_pagetables.c x86/mm: Map cpu_entry_area at the same place on 4/5 level 2018-01-04 23:04:57 +01:00
extable.c x86/fpu: Reinitialize FPU registers if restoring FPU state fails 2017-09-25 09:26:38 +02:00
fault.c Merge commit 'upstream-x86-entry' into WIP.x86/mm 2017-12-17 12:58:53 +01:00
highmem_32.c x86/mm: Audit and remove any unnecessary uses of module.h 2016-07-14 13:04:20 +02:00
hugetlbpage.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ident_map.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
init.c x86/mm: Use INVPCID for __native_flush_tlb_single() 2017-12-23 21:13:01 +01:00
init_32.c x86/cpu_entry_area: Move it out of the fixmap 2017-12-22 20:13:05 +01:00
init_64.c x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages' 2017-10-30 10:30:23 +01:00
iomap_32.c x86/mm: Audit and remove any unnecessary uses of module.h 2016-07-14 13:04:20 +02:00
ioremap.c x86/mm: Use proper encryption attributes with /dev/mem 2017-07-18 11:38:05 +02:00
kasan_init_64.c x86/cpu_entry_area: Move it out of the fixmap 2017-12-22 20:13:05 +01:00
kaslr.c x86/kaslr: Fix the vaddr_end mess 2018-01-05 00:39:57 +01:00
kmmio.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile x86/mm/pti: Add infrastructure for page table isolation 2017-12-23 21:12:59 +01:00
mem_encrypt.c x86/mm: Unbreak modules that rely on external PAGE_KERNEL availability 2017-11-08 13:52:36 -08:00
mem_encrypt_boot.S x86/mm: Fix SME encryption stack ptr handling 2017-08-29 10:57:16 +02:00
mm_internal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmap.c Revert "x86/mm: Limit mmap() of /dev/mem to valid physical addresses" 2017-10-27 10:06:49 +02:00
mmio-mod.c x86/boot/e820: Move asm/e820.h to asm/e820/api.h 2017-01-28 09:31:13 +01:00
mpx.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
numa.c Merge branch 'x86/boot' into x86/mm, to avoid conflict 2017-04-11 08:56:05 +02:00
numa_32.c x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init() 2017-05-09 08:12:27 +02:00
numa_64.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
numa_emulation.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
numa_internal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pageattr-test.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pageattr.c x86, drm, fbdev: Do not specify encrypted memory for video mappings 2017-07-18 11:38:04 +02:00
pat.c x86/mm: Use proper encryption attributes with /dev/mem 2017-07-18 11:38:05 +02:00
pat_internal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pat_rbtree.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pf_in.c x86/mm: Audit and remove any unnecessary uses of module.h 2016-07-14 13:04:20 +02:00
pf_in.h
pgtable.c x86/mm/pti: Allocate a separate user PGD 2017-12-23 21:13:00 +01:00
pgtable_32.c x86/cpu_entry_area: Move it out of the fixmap 2017-12-22 20:13:05 +01:00
physaddr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
physaddr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pkeys.c x86/fpu: Rename fpu::fpstate_active to fpu::initialized 2017-09-26 09:43:36 +02:00
pti.c x86/pti: Make sure the user/kernel PTEs match 2018-01-03 15:57:59 +01:00
setup_nx.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
srat.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
testmmiotrace.c Annotate hardware config module parameters in arch/x86/mm/ 2017-04-04 16:54:21 +01:00
tlb.c x86/mm: Use/Fix PCID to optimize user/kernel switches 2017-12-23 21:13:00 +01:00