Skip to contentSkip to conversation

mm-migrate-untag-addresses-when-querying-page-nodes.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Nov 3 Stable branch

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/migrate: untag addresses when querying page nodes
has been removed from the -mm tree. Its filename was
mm-migrate-untag-addresses-when-querying-page-nodes.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: Hungyu Lin <[email protected]>
Subject: mm/migrate: untag addresses when querying page nodes
Date: Mon, 26 Oct 2026 19:53:29 +0000

When move_pages() is used with nodes == NULL, do_pages_stat_array() passes each page address directly to vma_lookup(). A valid tagged address therefore fails the VMA lookup and gets -EFAULT in its status entry, instead of the node reported for the corresponding untagged address.

The tagged address ABI permits these pointers, and the migration path already removes their tags. Apply the target mm's untagging rules to the query path as well, while holding its mmap read lock.

Fixes 057d3389108e ("mm: untag user pointers passed to memory syscalls")
Cc Matthew Brost <[email protected]>
Cc Joshua Hahn <[email protected]>
Cc Byungchul Park <[email protected]>
Cc Gregory Price <[email protected]>
Cc Ying Huang <[email protected]>
Cc Alistair Popple <[email protected]>
Cc Andrey Konovalov <[email protected]>
Cc Vincenzo Frascino <[email protected]>

---

 mm/migrate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/migrate.c renamed from mm/migrate.c~mm-migrate-untag-addresses-when-querying-page-nodes +1 -1
@@ -2461,7 +2461,7 @@ static void do_pages_stat_array(struct m
 	mmap_read_lock(mm);
 
 	for (i = 0; i < nr_pages; i++) {
-		unsigned long addr = (unsigned long)(*pages);
+		unsigned long addr = (unsigned long)untagged_addr_remote(mm, *pages);
 		struct vm_area_struct *vma;
 		struct folio_walk fw;
 		struct folio *folio;

_

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

fat-fix-parent-link-count-when-replacing-a-sibling-directory.patch delayacct-preserve-delay-extrema-when-aggregating-taskstats.patch shmem-clamp-negative-used-block-samples-in-statfs.patch