linux-stable/arch
Ard Biesheuvel a4f42f7b01 arm64: kaslr: ensure randomized quantities are clean also when kaslr is off
commit 8ea2359323 upstream.

Commit 1598ecda7b ("arm64: kaslr: ensure randomized quantities are
clean to the PoC") added cache maintenance to ensure that global
variables set by the kaslr init routine are not wiped clean due to
cache invalidation occurring during the second round of page table
creation.

However, if kaslr_early_init() exits early with no randomization
being applied (either due to the lack of a seed, or because the user
has disabled kaslr explicitly), no cache maintenance is performed,
leading to the same issue we attempted to fix earlier, as far as the
module_alloc_base variable is concerned.

Note that module_alloc_base cannot be initialized statically, because
that would cause it to be subject to a R_AARCH64_RELATIVE relocation,
causing it to be overwritten by the second round of KASLR relocation
processing.

Fixes: f80fb3a3d5 ("arm64: add support for kernel ASLR")
Cc: <stable@vger.kernel.org> # v4.6+
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-06 17:30:12 +01:00
..
alpha arch/alpha, termios: implement BOTHER, IBSHIFT and termios2 2018-11-21 09:19:20 +01:00
arc ARC: perf: map generic branches to correct hardware condition 2019-01-31 08:14:35 +01:00
arm ARM: cns3xxx: Fix writing to wrong PCI config registers after alignment 2019-02-06 17:30:11 +01:00
arm64 arm64: kaslr: ensure randomized quantities are clean also when kaslr is off 2019-02-06 17:30:12 +01:00
c6x kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
h8300 Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
hexagon hexagon: modify ffs() and fls() to return int 2018-09-10 19:42:15 -05:00
ia64 ia64: Fix allnoconfig section mismatch for ioc_init/ioc_iommu_info 2018-08-22 14:12:47 -07:00
m68k m68k: Fix memblock-related crashes 2019-01-13 09:51:02 +01:00
microblaze mm: make the __PAGETABLE_PxD_FOLDED defines non-empty 2018-12-29 13:37:57 +01:00
mips MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur 2019-01-26 09:32:35 +01:00
nds32 mm: make the __PAGETABLE_PxD_FOLDED defines non-empty 2018-12-29 13:37:57 +01:00
nios2 nios2: kconfig: remove duplicate DEBUG_STACK_USAGE symbol defintions 2018-08-27 09:47:20 +08:00
openrisc OpenRISC updates for 4.19 2018-08-23 14:09:37 -07:00
parisc mm: make the __PAGETABLE_PxD_FOLDED defines non-empty 2018-12-29 13:37:57 +01:00
powerpc powerpc/xmon: Fix invocation inside lock region 2019-01-26 09:32:37 +01:00
riscv riscv: fix warning in arch/riscv/include/asm/module.h 2018-12-13 09:16:14 +01:00
s390 s390/smp: Fix calling smp_call_ipl_cpu() from ipl CPU 2019-01-31 08:14:41 +01:00
sh sh/function_graph: Simplify with function_graph_enter() 2018-12-05 19:32:09 +01:00
sparc sparc/function_graph: Simplify with function_graph_enter() 2018-12-05 19:32:10 +01:00
um um: Give start_idle_thread() a return code 2018-11-27 16:12:59 +01:00
unicore32 mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
x86 x86/entry/64/compat: Fix stack switching for XEN PV 2019-01-31 08:14:39 +01:00
xtensa xtensa: fix coprocessor part of ptrace_{get,set}xregs 2018-12-05 19:32:06 +01:00
.gitignore
Kconfig Merge branch 'tlb-fixes' 2018-08-23 14:55:01 -07:00