Skip to content
Commit bf2b59f6 authored by Anshuman Khandual's avatar Anshuman Khandual Committed by Catalin Marinas
Browse files

arm64/mm: Hold memory hotplug lock while walking for kernel page table dump



The arm64 page table dump code can race with concurrent modification of the
kernel page tables. When a leaf entries are modified concurrently, the dump
code may log stale or inconsistent information for a VA range, but this is
otherwise not harmful.

When intermediate levels of table are freed, the dump code will continue to
use memory which has been freed and potentially reallocated for another
purpose. In such cases, the dump code may dereference bogus addresses,
leading to a number of potential problems.

Intermediate levels of table may by freed during memory hot-remove,
which will be enabled by a subsequent patch. To avoid racing with
this, take the memory hotplug lock when walking the kernel page table.

Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
Acked-by: Mark Rutland's avatarMark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas's avatarCatalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Steven Price's avatarSteven Price <steven.price@arm.com>
Signed-off-by: Anshuman Khandual's avatarAnshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas's avatarCatalin Marinas <catalin.marinas@arm.com>
parent f8788d86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment