From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796367844; b=Sjc6IXd24OiM5pfQFU7jzWdKIU7LCVgkIp5JrgtpD/mUmmyvlGV18MtaG/QrwdhWEGGK tMHZCpbV7484Avo+tZ8V/EFrMcWNB4ReUUkgj8e/yWNOE7siQeYf12R3VCgcxqQoMOzgJ 5QXmFMnXe4C/dRtjmhzOScevLZwfZsF7cwu1/lrr19jVz/gWM58M9otYdoMnCxj0yWhMk vzlas/TuE5Mm0mz+yYeq7Cn7Y1NnqXOPlKA6hBw0CnYbi+KYoJNzAkKGJVKx3/eR0T6z5 mqMsXNC8mtJmaZdsQ8Fb9+1skxO4bXkW1QFJzcg8bdV8WYDjoPCX4ZTXxpU67si/ZDg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796367844; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=RXllboqBW155A5tJnR1TX7BECeKUFF3o/iGzD7eAfvA=; b=Ncm1wDcROfWevQMu8WnXjKGhDopzG5YDhKuZ471b8LbNYuJyBMH3rwivvR6r/XXegSoJ kgmPUobOjmY1IkTSm+98fmkk1aONNGitqyXrWFYGweENl8cH39Mbpqq63DXGQGz4H7V+/ PyQqMj4dT8ywdTkSCGeJX6bYqsz/8jORf2Kx9f1SqyeE4b9wVgYHUDWJ2QS/aKB5dpJ7U 8asFoUiGZbZtR59hA24sus8BZzUna0Pb64PFONmed1Cd6FzUAVKCm8pGwHSP1TeH9u9xm ckfeFSCqFl5eOBLlwFE2k+bzguZo/x8TJqzCP2aOvv5f1/teLwyZFx1imISghBNriKw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b="UCxlVQd/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEABD606A322 for ; Fri, 4 Dec 2026 07:04:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=UCxlVQd/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 240F41F000CE; Fri, 4 Dec 2026 07:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796367844; bh=RXllboqBW155A5tJnR1TX7BECeKUFF3o/iGzD7eAfvA=; h=Date:To:From:In-Reply-To:References:Subject; b=UCxlVQd/M4c+O+yQK1T7G8EsI8n/feORi4CBYwq1fYFsbqYHxMss+DG0234fuZXBp zy+yqrBzd62lqe6YIXAznFPHJjBfnu6Gtbtkh89xU+FSY6o/MmZbpuJFRyIUJZ/Ie+ e6QfzlwBmLfC6VHnje3c6ciFvS4Jc6F9uttvgGEw= Date: Thu, 03 Dec 2026 23:04:03 -0800 To: mm-commits@vger.kernel.org,surenb@google.com,peterx@redhat.com, david@kernel.org,rppt@kernel.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261203-fixes-uffd-sashiko-v2-2-308ce557a7b6@kernel.org> References: <20261203-fixes-uffd-sashiko-v2-2-308ce557a7b6@kernel.org> Subject: + userfaultfd-mark-zero-pages-moved-by-uffdio_move-soft-dirty.patch added to mm-new branch Message-Id: <20261204070404.240F41F000CE@smtp.kernel.org> X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list The patch titled Subject: userfaultfd: mark zero pages moved by UFFDIO_MOVE soft-dirty has been added to the -mm mm-new branch. Its filename is userfaultfd-mark-zero-pages-moved-by-uffdio_move-soft-dirty.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/userfaultfd-mark-zero-pages-moved-by-uffdio_move-soft-dirty.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. The mm-new branch of mm.git is not included in linux-next If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: "Mike Rapoport (Microsoft)" Subject: userfaultfd: mark zero pages moved by UFFDIO_MOVE soft-dirty Date: Thu, 03 Dec 2026 19:15:22 +0200 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. Link: https://patch.msgid.link/20261203-fixes-uffd-sashiko-v2-2-308ce557a7b6@kernel.org Fixes: eb1521dad8f3 ("userfaultfd: handle zeropage moves by UFFDIO_MOVE") Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Andrew Morton Reported-by: Sashiko Closes: https://sashiko.dev/bug/linux-0c1c66e4-231d-4567-a40c-42243a875a5d Reviewed-by: David Hildenbrand (Arm) Cc: Peter Xu Cc: Suren Baghdasaryan mm/userfaultfd.c | 2 ++ 1 file changed, 2 insertions(+) --- a/mm/userfaultfd.c~userfaultfd-mark-zero-pages-moved-by-uffdio_move-soft-dirty +++ a/mm/userfaultfd.c @@ -1426,6 +1426,8 @@ static int move_zeropage_pte(struct mm_s zero_pte = pte_mkspecial(pfn_pte(zero_pfn(dst_addr), dst_vma->vm_page_prot)); + if (pgtable_supports_soft_dirty()) + zero_pte = pte_mksoft_dirty(zero_pte); /* Re-arm RWP on the moved PTE if dst_vma is RWP-registered. */ if (userfaultfd_rwp(dst_vma)) { _ Patches currently in -mm which might be from rppt@kernel.org are mm-cma-simplify-cma_declare_contiguous_multi.patch mm-fake-numa-fix-leak-of-the-distance-table-copy-on-errors.patch mm-secretmem-disable-memfd_secret-if-secretmem_init-fails.patch mm-cma-fix-handling-of-free-ranges-that-cross-4g-for-multi-range-areas.patch userfaultfd-write-lock-the-vma-before-clearing-its-uffd-state.patch userfaultfd-mark-zero-pages-moved-by-uffdio_move-soft-dirty.patch userfaultfd-mark-thps-moved-by-uffdio_move-soft-dirty.patch selftests-mm-free-the-test-context-when-uffd_test_ctx_init-fails.patch hibernation-make-swsusp_page-helpers-static.patch hibernation-ensure-secretmem-pages-dont-reach-a-snapshot.patch hibernate-handle-potential-errors-in-hibernate_mapunmap_page.patch hibernation-kfence-explicitly-map-unmap-kfence-pages.patch hibernation-make-hibernation-unavailable-when-debug_pagealloc-is-on.patch