Re: [PATCH] arm64: mm: Fix the break-before-make flush range for erratum 2645198

From: Will Deacon

Date: Thu Sep 24 2026 - 06:31:48 EST


On Wed, 23 Sep 2026 16:36:32 +0200, Andrea Parri wrote:
> modify_prot_start_ptes() performs the break-before-make TLB invalidation
> required by erratum 2645198 with __flush_tlb_range(), whose third
> argument is the end address of the range. It passes nr * PAGE_SIZE
> instead of addr + nr * PAGE_SIZE, so __do_flush_tlb_range() computes the
> page count as (nr * PAGE_SIZE - addr) >> PAGE_SHIFT.
>
> For addr > nr * PAGE_SIZE that subtraction underflows, the page count
> exceeds the batching limit and the flush degenerates to flush_tlb_mm(),
> so a single-page mprotect broadcasts an ASID-wide invalidation and a
> full-range mmu notifier call.
>
> [...]

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

[1/1] arm64: mm: Fix the break-before-make flush range for erratum 2645198
https://git.kernel.org/arm64/c/1fef81669147

Cheers,
--
Will

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