Skip to contentSkip to conversation

mm-gup-detect-huge-pfnmap-entries-in-gup-fast.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 17, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/gup: detect huge pfnmap entries in gup-fast
has been removed from the -mm tree. Its filename was
mm-gup-detect-huge-pfnmap-entries-in-gup-fast.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Peter Xu <[email protected]>
Subject: mm/gup: detect huge pfnmap entries in gup-fast
Date: Mon, 26 Aug 2024 16:43:39 -0400

Since gup-fast doesn't have the vma reference, teach it to detect such huge pfnmaps by checking the special bit for pmd/pud too, just like ptes.

Cc Alexander Gordeev <[email protected]>
Cc Alex Williamson <[email protected]>
Cc Aneesh Kumar K.V <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Gavin Shan <[email protected]>
Cc Gerald Schaefer <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Niklas Schnelle <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Ryan Roberts <[email protected]>
Cc Sean Christopherson <[email protected]>
Cc Sven Schnelle <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Will Deacon <[email protected]>
Cc Zi Yan <[email protected]>

---

 mm/gup.c |    6 ++++++
 1 file changed, 6 insertions(+)
mm/gup.c renamed from mm/gup.c~mm-gup-detect-huge-pfnmap-entries-in-gup-fast +6 -0
@@ -3038,6 +3038,9 @@ static int gup_fast_pmd_leaf(pmd_t orig,
 	if (!pmd_access_permitted(orig, flags & FOLL_WRITE))
 		return 0;
 
+	if (pmd_special(orig))
+		return 0;
+
 	if (pmd_devmap(orig)) {
 		if (unlikely(flags & FOLL_LONGTERM))
 			return 0;
@@ -3082,6 +3085,9 @@ static int gup_fast_pud_leaf(pud_t orig,
 	if (!pud_access_permitted(orig, flags & FOLL_WRITE))
 		return 0;
 
+	if (pud_special(orig))
+		return 0;
+
 	if (pud_devmap(orig)) {
 		if (unlikely(flags & FOLL_LONGTERM))
 			return 0;

_

Patches currently in -mm which might be from [email protected] are