lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260116162652.176054-1-baolin.wang@linux.alibaba.com>
Date: Sat, 17 Jan 2026 00:26:52 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: baolin.wang@...ux.alibaba.com
Cc: Liam.Howlett@...cle.com,
	akpm@...ux-foundation.org,
	baohua@...nel.org,
	catalin.marinas@....com,
	david@...nel.org,
	dev.jain@....com,
	harry.yoo@...cle.com,
	jannh@...gle.com,
	linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	linux-mm@...ck.org,
	lorenzo.stoakes@...cle.com,
	mhocko@...e.com,
	riel@...riel.com,
	rppt@...nel.org,
	ryan.roberts@....com,
	surenb@...gle.com,
	vbabka@...e.cz,
	will@...nel.org,
	willy@...radead.org
Subject: [PATCH] mm: rmap: skip batched unmapping for UFFD vmas

As Dev reported[1], it's not ready to support batched unmapping for uffd case.
Let's still fallback to per-page unmapping for the uffd case.

[1] https://lore.kernel.org/linux-mm/20260116082721.275178-1-dev.jain@arm.com/
Reported-by: Dev Jain <dev.jain@....com>
Suggested-by: Barry Song <baohua@...nel.org>
Signed-off-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
---
 mm/rmap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/rmap.c b/mm/rmap.c
index f13480cb9f2e..172643092dcf 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1953,6 +1953,9 @@ static inline unsigned int folio_unmap_pte_batch(struct folio *folio,
 	if (pte_unused(pte))
 		return 1;
 
+	if (userfaultfd_wp(vma))
+		return 1;
+
 	return folio_pte_batch(folio, pvmw->pte, pte, max_nr);
 }
 
-- 
2.47.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ