[PATCH] arm64: trans_pgd: clone only the linear map that exists at runtime

Will Deacon will at kernel.org
Thu Sep 3 06:59:18 PDT 2026


On Fri, 28 Aug 2026 02:28:18 -0700, Breno Leitao wrote:
> 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.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: trans_pgd: clone only the linear map that exists at runtime
      https://git.kernel.org/arm64/c/1537e55728ec

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev



More information about the linux-arm-kernel mailing list