Re: [PATCH v2 3/4] userfaultfd: mark THPs moved by UFFDIO_MOVE soft-dirty
From: Jose A. Perez de Azpillaga
Date: Fri Dec 04 2026 - 04:32:23 EST
On 12/3/26 6:15 PM, Mike Rapoport (Microsoft) wrote:
> UFFDIO_MOVE marks moved PTEs and a moved huge zero page soft-dirty, like
> mremap() does.
>
> A THP is the exception. move_pages_huge_pmd() creates the destination PMD
> from scratch and does not mark it soft-dirty, so soft-dirty trackers such
> as CRIU miss the move.
>
> Mark the moved THP PMD soft-dirty with move_soft_dirty_pmd(), like
> mremap() does for PMDs.
>
> Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
> Reviewed-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
> Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
LGTM:
Reviewed-by: Jose A. Perez de Azpillaga <azpijr@xxxxxxxxx>
--
cheers,
jose a. p-a