On Thu, 15 Sep 2022, Jann Horn wrote: > On Thu, Sep 15, 2022 at 1:01 PM Greg Kroah-Hartman > <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > > On Thu, Sep 15, 2022 at 12:48:44PM +0200, Jann Horn wrote: > > > Hi! > > > > > > Hugh reached out to me and let me know (in nicer words) that I botched > > > my attempt to re-implement b67fbebd4cf9 for the stable backport; the > > > backport is an incomplete fix (because I forgot that in > > > unmap_region(), "vma" is just one of potentially several VMAs). > > > > > > What should the commit message for fixing that look like? And should > > > we first revert the botched backport and then do a correct backport on > > > top of that, or should I write a single fix commit? > > > > Which every you want is fine with me, I can easily add 1 or 2 patches :) > > > > If you want do the revert now, and get a release out with that, and then > > do a "better" patch later, that's fine too, just let me know what you > > want to do. > > Ok, I just sent you a fixup patch that should apply cleanly to the > affected stable trees ("[PATCH stable 4.9-5.15] mm: Fix TLB flush for > not-first PFNMAP mappings in unmap_region()"). > > @Hugh: Can you maybe take a look and let me know if this looks reasonable now? Yes, that one looks fine to me, thanks Jann. I would not have liked it if Peter had chosen that way for upstream, but there's good reason to avoid using tlb_end_vma() in these backports, and good reason to avoid cluttering up free_pgtables(). No way great: this way good enough, thanks. Hugh