Skip to contentSkip to conversation

mm-re-allow-pinning-of-zero-pfns-again.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 2 participants 2 messages Aug 17, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: re-allow pinning of zero pfns (again)
has been removed from the -mm tree. Its filename was
mm-re-allow-pinning-of-zero-pfns-again.patch

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

------------------------------------------------------
From: Alex Williamson <[email protected]>
Subject: mm: re-allow pinning of zero pfns (again)
Date: Wed, 10 Aug 2022 10:53:59 -0600

The below referenced commit makes the same error as 1c563432588d ("mm: fix is_pinnable_page against a cma page"), re-interpreting the logic to exclude pinning of the zero page, which breaks device assignment with vfio.

To avoid further subtle mistakes, split the logic into discrete tests.

---

 include/linux/mm.h |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
include/linux/mm.h renamed from include/linux/mm.h~mm-re-allow-pinning-of-zero-pfns-again +2 -3
@@ -1544,9 +1544,8 @@ static inline bool is_longterm_pinnable_
 	if (mt == MIGRATE_CMA || mt == MIGRATE_ISOLATE)
 		return false;
 #endif
-	return !(is_device_coherent_page(page) ||
-		 is_zone_movable_page(page) ||
-		 is_zero_pfn(page_to_pfn(page)));
+	return !(is_device_coherent_page(page) || is_zone_movable_page(page)) ||
+	       is_zero_pfn(page_to_pfn(page));
 }
 #else
 static inline bool is_longterm_pinnable_page(struct page *page)

_

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

#1 lore raw
Quoted 40 lines · On Wed, 17 Aug 2022 13:57:00 -0700 Andrew Morton <[email protected]>…

The quilt patch titled
Subject: mm: re-allow pinning of zero pfns (again)
has been removed from the -mm tree. Its filename was
mm-re-allow-pinning-of-zero-pfns-again.patch

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

------------------------------------------------------
From: Alex Williamson <[email protected]>
Subject: mm: re-allow pinning of zero pfns (again)
Date: Wed, 10 Aug 2022 10:53:59 -0600

The below referenced commit makes the same error as 1c563432588d ("mm: fix is_pinnable_page against a cma page"), re-interpreting the logic to exclude pinning of the zero page, which breaks device assignment with vfio.

To avoid further subtle mistakes, split the logic into discrete tests.

---

 include/linux/mm.h |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
include/linux/mm.h renamed from include/linux/mm.h~mm-re-allow-pinning-of-zero-pfns-again +0 -0
@@ -1544,9 +1544,8 @@ static inline bool is_longterm_pinnable_
 	if (mt == MIGRATE_CMA || mt == MIGRATE_ISOLATE)

include/linux/mm.h static inline bool is_longterm_pinnable_ · line 1551

Quoted 10 lines
include/linux/mm.h renamed from include/linux/mm.h~mm-re-allow-pinning-of-zero-pfns-again +2 -3
 		return false;
 #endif
-	return !(is_device_coherent_page(page) ||
-		 is_zone_movable_page(page) ||
-		 is_zero_pfn(page_to_pfn(page)));
+	return !(is_device_coherent_page(page) || is_zone_movable_page(page)) ||
+	       is_zero_pfn(page_to_pfn(page));
 }
 #else
 static inline bool is_longterm_pinnable_page(struct page *page)

Something is off here, this is the v1 patch with the v2 commit log, including link to the v2 posting. Thanks,

Alex