summaryrefslogtreecommitdiff
path: root/drivers/md/raid6test/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorAnshuman Khandual <anshuman.khandual@arm.com>2026-03-09 02:57:25 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2026-04-01 18:04:54 +0100
commit95a58852b0e5413b6ef4c93da60a80e89da9986a (patch)
treefc4906d2c1326a54ff2005c4fad2f507e3edbef9 /drivers/md/raid6test/git@git.tavy.me:linux.git
parent48478b9f791376b4b89018d7afdfd06865498f65 (diff)
arm64/mm: Reject memory removal that splits a kernel leaf mapping
Linear and vmemmap mappings that get torn down during a memory hot remove operation might contain leaf level entries on any page table level. If the requested memory range's linear or vmemmap mappings falls within such leaf entries, new mappings need to be created for the remaining memory mapped on the leaf entry earlier, following standard break before make aka BBM rules. But kernel cannot tolerate BBM and hence remapping to fine grained leaves would not be possible on systems without BBML2_NOABORT. Currently memory hot remove operation does not perform such restructuring, and so removing memory ranges that could split a kernel leaf level mapping need to be rejected. While memory_hotplug.c does appear to permit hot removing arbitrary ranges of memory, the higher layers that drive memory_hotplug (e.g. ACPI, virtio, ...) all appear to treat memory as fixed size devices. So it is impossible to hot unplug a different amount than was previously hot plugged, and hence we should never see a rejection in practice, but adding the check makes us robust against a future change. Cc: Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/all/aWZYXhrT6D2M-7-N@willie-the-truck/ Reviewed-by: David Hildenbrand (Arm) <david@kernel.org> Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> Suggested-by: Ryan Roberts <ryan.roberts@arm.com> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'drivers/md/raid6test/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions