kernel_optimize_test/arch/arm64
Pavel Tatashin 68abc01156 arm64: mm: correct the inside linear map range during hotplug check
[ Upstream commit ee7febce051945be28ad86d16a15886f878204de ]

Memory hotplug may fail on systems with CONFIG_RANDOMIZE_BASE because the
linear map range is not checked correctly.

The start physical address that linear map covers can be actually at the
end of the range because of randomization. Check that and if so reduce it
to 0.

This can be verified on QEMU with setting kaslr-seed to ~0ul:

memstart_offset_seed = 0xffff
START: __pa(_PAGE_OFFSET(vabits_actual)) = ffff9000c0000000
END:   __pa(PAGE_END - 1) =  1000bfffffff

Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Fixes: 58284a901b ("arm64/mm: Validate hotplug range before creating linear mapping")
Tested-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20210216150351.129018-2-pasha.tatashin@soleen.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-07 15:00:03 +02:00
..
boot arm64: dts: ls1043a: mark crypto engine dma coherent 2021-03-30 14:31:55 +02:00
configs
crypto crypto: arm64/sha - add missing module aliases 2021-03-04 11:38:31 +01:00
include KVM: arm64: Fix nVHE hyp panic host context restore 2021-03-17 17:06:37 +01:00
kernel arm64: kdump: update ppos when reading elfcorehdr 2021-03-30 14:32:03 +02:00
kvm KVM: arm64: Fix nVHE hyp panic host context restore 2021-03-17 17:06:37 +01:00
lib
mm arm64: mm: correct the inside linear map range during hotplug check 2021-04-07 15:00:03 +02:00
net
xen
Kbuild
Kconfig arm64: Make CPU_BIG_ENDIAN depend on ld.bfd or ld.lld 13.0.0+ 2021-03-11 14:17:22 +01:00
Kconfig.debug
Kconfig.platforms
Makefile arm64: link with -z norelro for LLD or aarch64-elf 2021-01-12 20:18:24 +01:00