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=1796367847; b=W0gS01cMAg0nPymXwjGh/KDcPqDWPHQhlPaBysDt4RvqepCCPdiNkrU2GsxgdVOJaOMK txudY9vuJJW+Sl7N8e54HE4caqJr0a1zKnR42Mga8DEAE+LwaPiAea3YSXHDl6eWUDrBL B1Y9P51hMwzLWuYH9PFJH9XdHnL7BaKvuNqxBV4AlnY1Ohq4V68ePY+GdkP/ltrWwC5pC aprANTxn2E9MGEK3l3KO5wYVMMGYZsVAhkICh8NQUQIxKcVgi5/5nhTmAddG7VglcBPwi 2Ki0O87K7dsElnldZPMYl1Y3onO31E+1FvZSREe58DBw6VRCySn0KKgmyfqrT+d1FpQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796367847; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=TVU8T4WZjFOtu809x97ZuoCnRL8qt4QendOanV7u4W8=; b=y4109dFKPoO6QzSKET+doaFZ56bBV9eXA0Q38MBAZ5Rc7TcrhJLnRipGkHsGkdazMqvU 8WC0WNDZ8muI+T+orX4xXsrf9hqb0KRTzqTU6Oh5TyOOIt6oa7cvxKqQuSy1yOvLjS7aB zJO9N93SVxTg46ZBGWGLV2X0POPgfv0JRwNpDmW1ZlKFIOipvLS1o9TEzGZNgiMTz3/Cs EU9w7heHn/LIQsCsRElHlEQeIShAAo6ZX4bFv4M0xLD6qDE2dt0jy67r/65zUFxphz77/ WHYmXqfu1PV8Oogs+R7lboXBX+5yUPht2c4ADulg1WnHovJ1BHAYdPs2P8lvSowVkDA== 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=RBFO3+9z; 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 E491C606A32C for ; Fri, 4 Dec 2026 07:04:06 +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=RBFO3+9z Received: by smtp.kernel.org (Postfix) with ESMTPSA id 683991F000CE; Fri, 4 Dec 2026 07:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796367846; bh=TVU8T4WZjFOtu809x97ZuoCnRL8qt4QendOanV7u4W8=; h=Date:To:From:In-Reply-To:References:Subject; b=RBFO3+9z12JDZ1ROX3ZdyTQtRAwLUofoQbgPigPxFLPe5YNu1sJJqM7TEhqjDkiko Pj1sMEa+bueb/qZ5FoXF6NvrIB9ZFbtoffTfadLlwLaxF0N8n6F+wbkStUR13KuN7N 9uhBk+/ua/RMdLUc9A89wzngB3iJU03BqPn4ui8c= Date: Thu, 03 Dec 2026 23:04:06 -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-3-308ce557a7b6@kernel.org> References: <20261203-fixes-uffd-sashiko-v2-3-308ce557a7b6@kernel.org> Subject: + userfaultfd-mark-thps-moved-by-uffdio_move-soft-dirty.patch added to mm-new branch Message-Id: <20261204070406.683991F000CE@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 THPs moved by UFFDIO_MOVE soft-dirty has been added to the -mm mm-new branch. Its filename is userfaultfd-mark-thps-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-thps-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 THPs moved by UFFDIO_MOVE soft-dirty Date: Thu, 03 Dec 2026 19:15:23 +0200 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. Link: https://patch.msgid.link/20261203-fixes-uffd-sashiko-v2-3-308ce557a7b6@kernel.org Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand (Arm) Cc: Peter Xu Cc: Suren Baghdasaryan mm/huge_memory.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/huge_memory.c~userfaultfd-mark-thps-moved-by-uffdio_move-soft-dirty +++ a/mm/huge_memory.c @@ -2983,6 +2983,7 @@ int move_pages_huge_pmd(struct mm_struct _dst_pmd = folio_mk_pmd(src_folio, dst_vma->vm_page_prot); /* Follow mremap() behavior and treat the entry dirty after the move */ _dst_pmd = pmd_mkwrite(pmd_mkdirty(_dst_pmd), dst_vma); + _dst_pmd = move_soft_dirty_pmd(_dst_pmd); } else { pmdp_huge_clear_flush(src_vma, src_addr, src_pmd); _dst_pmd = folio_mk_pmd(huge_zero_folio, dst_vma->vm_page_prot); _ 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