Re: [PATCH] arm64: trans_pgd: mark PTEs entries as valid to avoid dead kexec()

From: Will Deacon
Date: Wed Sep 04 2024 - 12:13:21 EST


On Mon, 02 Sep 2024 16:33:08 +0000, Fares Mehanna wrote:
> The reasons for PTEs in the kernel direct map to be marked invalid are not
> limited to kfence / debug pagealloc machinery. In particular,
> memfd_secret() also steals pages with set_direct_map_invalid_noflush().
>
> When building the transitional page tables for kexec from the current
> kernel's page tables, those pages need to become regular writable pages,
> otherwise, if the relocation places kexec segments over such pages, a fault
> will occur during kexec, leading to host going dark during kexec.
>
> [...]

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

[1/1] arm64: trans_pgd: mark PTEs entries as valid to avoid dead kexec()
https://git.kernel.org/arm64/c/7eced90b202d

Cheers,
--
Will

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