Re: [PATCH v2] mmu_gather: move tlb flush for VM_PFNMAP/VM_MIXEDMAP vmas into free_pgtables()

From: Peter Zijlstra
Date: Fri Jan 24 2025 - 04:21:51 EST


On Fri, Jan 24, 2025 at 09:31:39AM +0100, Peter Zijlstra wrote:
> On Thu, Jan 23, 2025 at 08:42:36PM -0800, Hugh Dickins wrote:
> > The changelog of commit b67fbebd4cf9 ("mmu_gather: Force tlb-flush
> > VM_PFNMAP vmas") has not helped me either. Nor could I locate any
> > discussion (Jann, Linus, Peter, Will?) that led up to it.
>
> Hmm, that was probably on security -- I should have those mails around
> somewhere, I'll see if I can dig them up.

Hugh, I've bounced you a copy of Jann's original report on the issue.

Subject: unmap_mapping_range() race with munmap() on VM_PFNMAP mappings leads to stale TLB entry