diff options
author | Anshuman Khandual <[email protected]> | 2020-11-13 13:00:14 +0530 |
---|---|---|
committer | Will Deacon <[email protected]> | 2020-11-13 09:45:08 +0000 |
commit | 58284a901b426e6130672e9f14c30dfd5a9dbde0 (patch) | |
tree | f562451615c467cf5a587482831bffb23d5e7f44 /arch/arm/include | |
parent | 04e613ded8c26489b3e0f9101b44462f780d1a35 (diff) |
arm64/mm: Validate hotplug range before creating linear mapping
During memory hotplug process, the linear mapping should not be created for
a given memory range if that would fall outside the maximum allowed linear
range. Else it might cause memory corruption in the kernel virtual space.
Maximum linear mapping region is [PAGE_OFFSET..(PAGE_END -1)] accommodating
both its ends but excluding PAGE_END. Max physical range that can be mapped
inside this linear mapping range, must also be derived from its end points.
This ensures that arch_add_memory() validates memory hot add range for its
potential linear mapping requirements, before creating it with
__create_pgd_mapping().
Fixes: 4ab215061554 ("arm64: Add memory hotplug support")
Signed-off-by: Anshuman Khandual <[email protected]>
Reviewed-by: Ard Biesheuvel <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Steven Price <[email protected]>
Cc: Robin Murphy <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'arch/arm/include')
0 files changed, 0 insertions, 0 deletions