linux-stable/arch/arm64
Ard Biesheuvel 8ea2359323 arm64: kaslr: ensure randomized quantities are clean also when kaslr is off
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>
2019-02-01 14:07:23 +00:00
..
boot arm64: dts: marvell: mcbin: fix PCIe reset signal 2019-01-10 12:20:32 +01:00
configs arm64: defconfig: enable modules for amlogic s400 sound card 2019-01-08 15:27:50 -08:00
crypto Kbuild updates for v4.21 2018-12-29 12:03:17 -08:00
include arm64/xen: fix xen-swiotlb cache flushing 2019-01-23 22:14:56 +01:00
kernel arm64: kaslr: ensure randomized quantities are clean also when kaslr is off 2019-02-01 14:07:23 +00:00
kvm Kconfig updates for v4.21 2018-12-29 13:03:29 -08:00
lib arm64: string: use asm EXPORT_SYMBOL() 2018-12-10 11:50:12 +00:00
mm arm64: Do not issue IPIs for user executable ptes 2019-02-01 14:06:50 +00:00
net bpf: arm64: Enable arm64 jit to provide bpf_line_info 2018-12-12 02:16:56 +01:00
xen
Kconfig Kconfig file consolidation for v4.21 2018-12-29 13:40:29 -08:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Kconfig.platforms ARM: SoC: late updates 2019-01-05 11:30:37 -08:00
Makefile kasan, arm64: adjust shadow size for tag-based mode 2018-12-28 12:11:43 -08:00