From patchwork Tue Jul 27 19:35:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 487486 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88484C4320A for ; Tue, 27 Jul 2021 19:35:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7512860FC4 for ; Tue, 27 Jul 2021 19:35:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230514AbhG0TfM (ORCPT ); Tue, 27 Jul 2021 15:35:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:33464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230454AbhG0TfM (ORCPT ); Tue, 27 Jul 2021 15:35:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9142560C51; Tue, 27 Jul 2021 19:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1627414511; bh=WXnDVQG3wwxZ4wIfYQH+3oY1d6B8iBEuxe6YqnNC9NM=; h=Date:From:To:Subject:From; b=1xgZSMm2B1K8Hc3ylJ/tGrKwRTE1/KmdTZv49Yr3nPeCFSfRuToKq9PJWGJrir6jN ap6yWZSwxlBdmmioq4P3qd1jItDqSgn1hu73nifB5dA48Tz59CqfPXcyddfPrKUK5M YuySgyWzRhkQtUJuWI5pspfUw80ICdq0dAymNJNI= Date: Tue, 27 Jul 2021 12:35:11 -0700 From: akpm@linux-foundation.org To: chaitanya.kulkarni@wdc.com, hch@lst.de, ira.weiny@intel.com, mm-commits@vger.kernel.org, stable@vger.kernel.org Subject: [merged] mm-call-flush_dcache_page-in-memcpy_to_page-and-memzero_page.patch removed from -mm tree Message-ID: <20210727193511.lcvC7oH36%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 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. Link: https://lkml.kernel.org/r/20210713055231.137602-2-hch@lst.de Fixes: bb90d4bc7b6a ("mm/highmem: Lift memcpy_[to|from]_page to core") Fixes: 28961998f858 ("iov_iter: lift memzero_page() to highmem.h") Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny Cc: Chaitanya Kulkarni Cc: Signed-off-by: Andrew Morton --- include/linux/highmem.h | 2 ++ 1 file changed, 2 insertions(+) --- a/include/linux/highmem.h~mm-call-flush_dcache_page-in-memcpy_to_page-and-memzero_page +++ a/include/linux/highmem.h @@ -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); }