[PATCH] arm64/mm: Permit lazy_mmu_mode to be nested
Will Deacon
will at kernel.org
Wed May 14 08:14:12 PDT 2025
On Mon, 12 May 2025 16:03:31 +0100, Ryan Roberts wrote:
> lazy_mmu_mode is not supposed to permit nesting. But in practice this
> does happen with CONFIG_DEBUG_PAGEALLOC, where a page allocation inside
> a lazy_mmu_mode section (such as zap_pte_range()) will change
> permissions on the linear map with apply_to_page_range(), which
> re-enters lazy_mmu_mode (see stack trace below).
>
> The warning checking that nesting was not happening was previously being
> triggered due to this. So let's relax by removing the warning and
> tolerate nesting in the arm64 implementation. The first (inner) call to
> arch_leave_lazy_mmu_mode() will flush and clear the flag such that the
> remainder of the work in the outer nest behaves as if outside of lazy
> mmu mode. This is safe and keeps tracking simple.
>
> [...]
Applied to arm64 (for-next/mm), thanks!
[1/1] arm64/mm: Permit lazy_mmu_mode to be nested
https://git.kernel.org/arm64/c/1ef3095b1405
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
More information about the linux-arm-kernel
mailing list