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=1796324415; b=jr0GqEuhpKbiBJETKTwo6plgIcCpHZ+7pwunc/s9KU9VvzgoBwW4NtRnycnJEE8CP5gh vQy64F5tXmPZmZoBW4Td1+5n8GCc+yRujqRa9KUYy/4Rr+2jruG5bU8FmHaPVSbIoEtrB S90HN3KG6LOzy8rTwXooIkT0Hhn6Ix4CHdWg8OIaO2ekpRufXJQsJhg/h8ONYhot4D0YI Ish9O4cmVEM4YrcTUe9wh/PRRxZIXlOIzHtX6cahd8bCW4k7fsEJvD7JWekDMp31SKMPk gHu5ozLfkRsGe/LmZGYf8h4NpPzZThaTJbPsMh6wxL/nOst5SVvKt9R77APt5ZjhVZw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796324415; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=gfKyVsuvJLyubrfJ2eTnpx795uJZYABUejCbtEBDysM=; b=dklfHUf7P+GjVX/OZb7u1YZHdXY/BZdI6bIW3RsVWnHKB8er9A9oNuqem+Yw9L8aZfhH PUu2MfbcXpa819uDau6cXG0wyW7En52U3xIFQIwwiltW8PSyf58gda7YXUw1T/hylSiVq LDPMrs8qVVt600fFYtkY9vAlMtZ3G/mcQWDZBfpIPKx0wts2yEsFPqvROOvxDMHriZJgM +wrbVYJARcqO6KsAeA/QIAeoihKmqOYn76HxGXFMZR1lYtsTmdWoT97R854v8ZEzCBTM5 lxZoBHekBJGyf1p9v7PgHYo9oYvE3vn32sBRbwcNl+qW80tNGPC67S0XezkGTD6PPuQ== 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=erctFCKV; 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 388D7606A33A for ; Thu, 3 Dec 2026 19:00:15 +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=erctFCKV Received: by smtp.kernel.org (Postfix) with ESMTPSA id 002311F031F1; Thu, 3 Dec 2026 19:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796324415; bh=gfKyVsuvJLyubrfJ2eTnpx795uJZYABUejCbtEBDysM=; h=Date:To:From:In-Reply-To:References:Subject; b=erctFCKVRDJx34VoXRB4VvOwxVy57IUhO93I7u9FXcoBJpBJCYwSlqkvKE7lxXjLC qId07O+LHXhUyI1R/Nt5oG4tcI4B5cEuaAu5D50uDBH1yuof/6u/ECVW+YX9cGBRA9 pcSGP/IPkahGNC21QPcjPNUq2kyc4fOCAajftC9E= Date: Thu, 03 Dec 2026 11:00:14 -0800 To: mm-commits@vger.kernel.org,david@kernel.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261125-hugetlb_fixes_2-v1-18-db27fd2f71a8@kernel.org> References: <20261125-hugetlb_fixes_2-v1-18-db27fd2f71a8@kernel.org> Subject: [to-be-updated] fs-proc-task_mmu-dont-clear-vm_softdirty-on-hugetlb-vmas.patch removed from -mm tree Message-Id: <20261203190015.002311F031F1@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 quilt patch titled Subject: fs/proc/task_mmu: don't clear VM_SOFTDIRTY on hugetlb VMAs has been removed from the -mm tree. Its filename was fs-proc-task_mmu-dont-clear-vm_softdirty-on-hugetlb-vmas.patch This patch was dropped because an updated version will be issued ------------------------------------------------------ From: "David Hildenbrand (Arm)" Subject: fs/proc/task_mmu: don't clear VM_SOFTDIRTY on hugetlb VMAs Date: Wed, 25 Nov 2026 23:33:16 +0100 hugetlb does not support soft-dirty tracking: since commit f96f7a40874d ("mm/hugetlb: fix hugetlb not supporting softdirty tracking"), vma_wants_writenotify() ignores VM_SOFTDIRTY for hugetlb VMAs, and clear_refs never clears the soft-dirty bits of hugetlb entries. However, clear_refs still clears VM_SOFTDIRTY on hugetlb VMAs. With CONFIG_MEM_SOFT_DIRTY, a FOLL_FORCE write to a private hugetlb mapping without VM_WRITE can then loop in __get_user_pages() until the task is killed, with the mmap_lock held for reading: __get_user_pages() retry: follow_page_mask() follow_huge_pmd() can_follow_write_pmd() pmd_needs_soft_dirty_wp() is true returns NULL faultin_page() hugetlb_wp() set_huge_ptep_maybe_writable() no VM_WRITE: the entry stays as it is returns 0 goto retry Let's fix it by not clearing VM_SOFTDIRTY on hugetlb VMAs, so we always treat hugetlb pages as soft-dirty. This has low urgency, as the loop can be killed. Link: https://patch.msgid.link/20261125-hugetlb_fixes_2-v1-18-db27fd2f71a8@kernel.org Fixes: 052ccfbcc6cd ("mm/hugetlb: support FOLL_FORCE|FOLL_WRITE") Signed-off-by: David Hildenbrand (Arm) Signed-off-by: Andrew Morton Reported-by: Chris Mason Reviewed-by: Muchun Song (ByteDance) Cc: Oscar Salvador Cc: Jinmeng Zhou Cc: Hongfu Li Cc: Andrea Arcangeli Cc: Naoya Horiguchi Cc: Hugh Dickins Cc: Baolin Wang Cc: Dave Airlie Cc: Vivek Kasireddy Cc: Gerd Hoffmann Cc: Mike Rapoport Cc: Mel Gorman Cc: Dave McCracken Cc: Andy Whitcroft Cc: Adam Litke Cc: Lorenzo Stoakes Cc: Rik van Riel Cc: Liam R. Howlett Cc: Vlastimil Babka Cc: Harry Yoo Cc: Jann Horn Cc: Lance Yang Cc: James Houghton Cc: Yang Shi Cc: Suren Baghdasaryan Cc: Shakeel Butt Cc: Pedro Falcato Cc: Gregory Price Cc: Zi Yan Cc: Joshua Hahn Cc: Rakie Kim Cc: Ying Huang Cc: Matthew Brost Cc: Byungchul Park Cc: Alistair Popple Cc: Wanpeng Li Cc: Andi Kleen Cc: Kenneth W Chen Cc: Michal Hocko Cc: David Rientjes Cc: Joern Engel Cc: Jonathan Corbet Cc: Shuah Khan Cc: Randy Dunlap Cc: Aneesh Kumar K.V Cc: KAMEZAWA Hiroyuki Cc: Kiryl Shutsemau Cc: Sasha Levin Cc: Guillaume Morin Cc: Jason Gunthorpe Cc: luojiajun Cc: Josef Bacik Cc: Daehyeon Ko <4ncienth@gmail.com> Cc: Ackerley Tng Cc: Jiaqi Yan Cc: fs/proc/task_mmu.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/proc/task_mmu.c~fs-proc-task_mmu-dont-clear-vm_softdirty-on-hugetlb-vmas +++ a/fs/proc/task_mmu.c @@ -1801,6 +1801,9 @@ static ssize_t clear_refs_write(struct f if (type == CLEAR_REFS_SOFT_DIRTY) { for_each_vma(vmi, vma) { + /* hugetlb does not support soft-dirty tracking. */ + if (vma_is_hugetlb(vma)) + continue; if (!vma_test(vma, VMA_SOFTDIRTY_BIT)) continue; vma_start_write(vma); _ Patches currently in -mm which might be from david@kernel.org are mm-mprotect-dont-skip-uffd-marker-install-when-racing-with-pte-table-reclaim.patch mm-userfaultfd-prevent-poison-marker-loss.patch mm-hugetlb-compare-against-persistent-count-when-freeing-lowmem-folios.patch mm-hugetlb-preserve-reservations-when-shrinking-on-highmem.patch mm-hugetlb-account-temporary-folios-separately.patch mm-hugetlb-account-temporary-folios-separately-fix.patch mm-hugetlb-serialize-page-cache-allocations-with-truncation.patch mm-hugetlb-serialize-page-cache-allocations-with-truncation-fix.patch mm-memfd-recheck-the-page-cache-before-allocating-a-hugetlb-folio.patch mm-hugetlb-count-again-if-the-reserve-map-shrank.patch mm-hugetlb-account-restored-reservations-before-freeing-folios.patch mm-hugetlb-delay-anon-folio-rmap-removal-until-after-the-tlb-flush.patch mm-userfaultfd-reject-dax-mappings.patch mm-filemap-avoid-retrying-faults-on-uffd-wp-markers.patch rfc-mm-hugetlb_cgroup-charge-faults-to-mm-owner.patch a.patch