diff options
| author | Breno Leitao <leitao@debian.org> | 2026-09-10 06:53:27 -0700 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-09-11 12:14:43 +0000 |
| commit | e4a6f57d22e079e23fafac51057fad534160b269 (patch) | |
| tree | 030616ec792c08bcd747241627364bce556fb65d /tools/perf/python/stackcollapse.py | |
| parent | 49daa3d668b69a5454b5aba0078848a479f79f1c (diff) | |
| download | linux-next-e4a6f57d22e079e23fafac51057fad534160b269.tar.gz linux-next-e4a6f57d22e079e23fafac51057fad534160b269.zip | |
arm64: hibernate: clone only the linear map that exists at runtime
This is similar to commit 1537e55728ec2 ("arm64: trans_pgd: clone only
the linear map that exists at runtime"), but in a different place.
swsusp_arch_resume() clones the kernel linear map with
trans_pgd_create_copy(..., PAGE_OFFSET, PAGE_END). PAGE_OFFSET comes
from the compile-time VA_BITS, so a CONFIG_ARM64_VA_BITS_52 kernel
booting on hardware without LPA2 -- vabits_actual is 48 and the fifth
level is folded -- hands the walk a 3.9PB window while its linear map
only spans the top 128TB.
On a VA_BITS_52 4k kernel with CONFIG_KASAN_GENERIC in a 4GB VM, I see:
swapper/0: page allocation failure: order:0, mode:0x920(GFP_ATOMIC|__GFP_ZERO)
hibernate_page_alloc+0x10/0x1c
swsusp_arch_resume+0x70/0x320
hibernation_restore+0xa4/0x138
software_resume+0x15c/0x270
PM: hibernation: Failed to load image, recovering.
PM: hibernation: resume failed (-12)
Fix it by copying the linear map that is the actual one, not the
compiled one.
Fixes: a6bbf5d4d9d1 ("arm64: mm: Add definitions to support 5 levels of paging")
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
