Skip to contentSkip to conversation

mm-hugetlb-fix-missing-cache-flush-in-copy_huge_page_from_user.patch removed from -mm tree

merged Andrew Morton 1 participant 1 message Mar 25, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm: hugetlb: fix missing cache flush in copy_huge_page_from_user()
has been removed from the -mm tree. Its filename was
mm-hugetlb-fix-missing-cache-flush-in-copy_huge_page_from_user.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Muchun Song <[email protected]>
Subject: mm: hugetlb: fix missing cache flush in copy_huge_page_from_user()

userfaultfd calls copy_huge_page_from_user() which does not do any cache flushing for the target page. Then the target page will be mapped to the user space with a different address (user address), which might have an alias issue with the kernel address used to copy the data from the user to. Fix this issue by flushing dcache in copy_huge_page_from_user().

Fixes fa4d75c1de13 ("userfaultfd: hugetlbfs: add copy_huge_page_from_user for hugetlb userfaultfd support")
Cc Axel Rasmussen <[email protected]>
Cc David Rientjes <[email protected]>
Cc Fam Zheng <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Lars Persson <[email protected]>
Cc Peter Xu <[email protected]>
Cc Xiongchun Duan <[email protected]>
Cc Zi Yan <[email protected]>

---

 mm/memory.c |    2 ++
 1 file changed, 2 insertions(+)
mm/memory.c renamed from mm/memory.c~mm-hugetlb-fix-missing-cache-flush-in-copy_huge_page_from_user +2 -0
@@ -5444,6 +5444,8 @@ long copy_huge_page_from_user(struct pag
 		if (rc)
 			break;
 
+		flush_dcache_page(subpage);
+
 		cond_resched();
 	}
 	return ret_val;

_

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