Skip to contentSkip to conversation

mm-call-flush_dcache_page-in-memcpy_to_page-and-memzero_page.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 27, 2021 Stable branch

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm: call flush_dcache_page() in memcpy_to_page() and memzero_page()
has been removed from the -mm tree. Its filename was
mm-call-flush_dcache_page-in-memcpy_to_page-and-memzero_page.patch

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

------------------------------------------------------
From: Christoph Hellwig <[email protected]>
Subject: mm: call flush_dcache_page() in memcpy_to_page() and memzero_page()

memcpy_to_page and memzero_page can write to arbitrary pages, which could be in the page cache or in high memory, so call flush_kernel_dcache_pages to flush the dcache.

This is a problem when using these helpers on dcache challeneged architectures. Right now there are just a few users, chances are no one used the PC floppy dr\u0456ver, the aha1542 driver for an ISA SCSI HBA, and a few advanced and optional btrfs and ext4 features on those platforms yet since the conversion.

Fixes bb90d4bc7b6a ("mm/highmem: Lift memcpy_[to|from]_page to core")
Fixes 28961998f858 ("iov_iter: lift memzero_page() to highmem.h")
Cc Chaitanya Kulkarni <[email protected]>

---

 include/linux/highmem.h |    2 ++
 1 file changed, 2 insertions(+)
include/linux/highmem.h renamed from include/linux/highmem.h~mm-call-flush_dcache_page-in-memcpy_to_page-and-memzero_page +2 -0
@@ -318,6 +318,7 @@ static inline void memcpy_to_page(struct
 
 	VM_BUG_ON(offset + len > PAGE_SIZE);
 	memcpy(to + offset, from, len);
+	flush_dcache_page(page);
 	kunmap_local(to);
 }
 
@@ -325,6 +326,7 @@ static inline void memzero_page(struct p
 {
 	char *addr = kmap_atomic(page);
 	memset(addr + offset, 0, len);
+	flush_dcache_page(page);
 	kunmap_atomic(addr);
 }
 

_

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

mmc-jz4740-remove-the-flush_kernel_dcache_page-call-in-jz4740_mmc_read_data.patch mmc-mmc_spi-replace-flush_kernel_dcache_page-with-flush_dcache_page.patch ps3disk-replace-flush_kernel_dcache_page-with-flush_dcache_page.patch scatterlist-replace-flush_kernel_dcache_page-with-flush_dcache_page.patch mm-remove-flush_kernel_dcache_page.patch