Re: [PATCH v2 2/4] userfaultfd: mark zero pages moved by UFFDIO_MOVE soft-dirty

From: Jose A. Perez de Azpillaga

Date: Fri Dec 04 2026 - 04:31:22 EST


On 12/3/26 6:15 PM, Mike Rapoport (Microsoft) wrote:
> Commit 75cb1cca2c88 ("mm: userfaultfd: correct dirty flags set for both
> present and swap pte") made UFFDIO_MOVE set the soft-dirty bit on moved
> PTEs, like mremap() does, so that soft-dirty trackers such as CRIU notice
> the move.
>
> It missed move_zeropage_pte(), so a zero page moved by UFFDIO_MOVE is not
> marked soft-dirty.
>
> Mark the moved zero page PTE soft-dirty as well.
>
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Closes: https://sashiko.dev/bug/linux-0c1c66e4-231d-4567-a40c-42243a875a5d
> Fixes: eb1521dad8f3 ("userfaultfd: handle zeropage moves by UFFDIO_MOVE")
> 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