Re: [PATCH v2 0/3] mm: khugepaged: fix tracepoint UAF

From: Andrew Morton

Date: Mon Aug 17 2026 - 18:30:56 EST


On Sun, 16 Aug 2026 02:16:32 +0800 Lance Yang <lance.yang@xxxxxxxxx> wrote:

> >>Pass the pfn to the tracepoints directly, captured while the folio is
> >>still pinned, closing the use-after-free windows in
> >>mm_khugepaged_scan_file(), mm_khugepaged_scan_pmd() and
> >>mm_khugepaged_collapse_file().
> >
> >Well spotted!
> >
> >Gave the series a run on x86_64 (KVM), all good (only classic SPARSEMEM
> >untested) :)
>
> Hmm ... stumbled over something else while testing this ...

Sashiko might have found a couple of pre-existing things.
https://sashiko.dev/#/patchset/20260815051924.194810-1-vernon2gm@xxxxxxxxx

Vernon, you may decide that the second one is on-topic for this patchset?