diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-12-13 09:40:29 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2024-02-09 10:56:11 +0000 |
commit | f9cca2444187f46e0bc90dfc3a5feb7154dbf38d (patch) | |
tree | 01344cb3a75458119bffe600cdbf224ec1af3510 | |
parent | 34f879fbe461dcdcaecb8bece3266dbea3a745ba (diff) | |
download | linux-stable-f9cca2444187f46e0bc90dfc3a5feb7154dbf38d.tar.gz linux-stable-f9cca2444187f46e0bc90dfc3a5feb7154dbf38d.tar.bz2 linux-stable-f9cca2444187f46e0bc90dfc3a5feb7154dbf38d.zip |
arm64: ptdump: Discover start of vmemmap region at runtime
We will soon reclaim the part of the vmemmap region that covers VA space
that is not addressable by the hardware. To avoid confusion, ensure that
the 'vmemmap start' marker points at the start of the region that is
actually being used for the struct page array, rather than the start of
the region we set aside for it at build time.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20231213084024.2367360-13-ardb@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
-rw-r--r-- | arch/arm64/mm/ptdump.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c index 66ccb8d6997e..5f0849528ccf 100644 --- a/arch/arm64/mm/ptdump.c +++ b/arch/arm64/mm/ptdump.c @@ -346,6 +346,8 @@ void ptdump_check_wx(void) static int __init ptdump_init(void) { + u64 page_offset = _PAGE_OFFSET(vabits_actual); + u64 vmemmap_start = (u64)virt_to_page((void *)page_offset); struct addr_marker m[] = { { PAGE_OFFSET, "Linear Mapping start" }, { PAGE_END, "Linear Mapping end" }, @@ -357,7 +359,7 @@ static int __init ptdump_init(void) { MODULES_END, "Modules end" }, { VMALLOC_START, "vmalloc() area" }, { VMALLOC_END, "vmalloc() end" }, - { VMEMMAP_START, "vmemmap start" }, + { vmemmap_start, "vmemmap start" }, { VMEMMAP_END, "vmemmap end" }, { PCI_IO_START, "PCI I/O start" }, { PCI_IO_END, "PCI I/O end" }, |