diff options
| author | Breno Leitao <leitao@debian.org> | 2026-08-28 02:28:18 -0700 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-09-03 13:01:15 +0000 |
| commit | 1537e55728ec2bc506c74ea69b93cd859da58fb8 (patch) | |
| tree | 8c9268dafcdaadf49e61ea17b0ddde89ff785511 /scripts/Makefile.thinlto | |
| parent | a77644d009dece1104b6fcc6e322b0e4503db0d6 (diff) | |
arm64: trans_pgd: clone only the linear map that exists at runtime
kexec_file_load() fails on arm64 if we have CONFIG_ARM64_VA_BITS_52 but
it runs on a !FEAT_LPA2 host (such as my loving Grace machine).
That is because trans_pgd_create_copy() uses the compile time
PAGE_OFFSET (VA 52) instead of the actual VA size (48 -- due to the lack
of LPA2). With the fifth level folded, pgd_none() is always false, so
the walk cannot skip the 15 extra PGDIR_SIZE slots, and they all alias
back to the same table: the whole kernel page table gets cloned 16
times, KASAN shadow included. Without KASAN it does not blow up, it just
wastes ~RAM/32 in page tables.
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>
Tested-by: Yury Smirnov <yurymonzon@gmail.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
