arm64: mm: correct the inside linear map range during hotplug check
stable inclusion from stable-5.10.28 commit 68abc0115617497f7fef9e585e840b0943ab71ec bugzilla: 51779 -------------------------------- [ Upstream commit ee7febce ] 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: NPavel Tatashin <pasha.tatashin@soleen.com> Fixes: 58284a90 ("arm64/mm: Validate hotplug range before creating linear mapping") Tested-by: NTyler Hicks <tyhicks@linux.microsoft.com> Reviewed-by: NAnshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20210216150351.129018-2-pasha.tatashin@soleen.comSigned-off-by: NWill Deacon <will@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: N Weilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录