From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52015C433F5 for ; Fri, 27 May 2022 01:49:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD44B8D0003; Thu, 26 May 2022 21:49:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D83998D0002; Thu, 26 May 2022 21:49:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6D818D0003; Thu, 26 May 2022 21:49:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B8A028D0002 for ; Thu, 26 May 2022 21:49:32 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 8797B356E9 for ; Fri, 27 May 2022 01:49:32 +0000 (UTC) X-FDA: 79509840984.24.C5D4AA5 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf18.hostedemail.com (Postfix) with ESMTP id 736151C0028 for ; Fri, 27 May 2022 01:49:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=o5JP67hvrgotgmezPbGYypcDo4nnvTv0cbfS455jeQQ=; b=I+RREeLbmR4SM1znY3+OvlZ5Bf Ua+2cRYGy6Wi0V4YCKEJBR6bhEccpOKBc72iutXGKTpGtbjgpIyB1XHGofmXyUGWxquxtgx01aFU8 E/fQXCeZISJ206T4G2fKDITSv4932YDpBNRfvTsZldIIwIwp2x2Uz/jBx2kswIbEpubqhiJ+d0Qcg z20V3ShdutGMBywwQlkLPCsm5sl+ek7Au0zrl0bqsDNbf63bPzZx5BXLY6ullSsFSDMpPizUNeZyY UMksW4Qis5YMGv/XjpKgnmPHSuLy3jvRPewmFlsnZVyrxslDEi2LgRKRm7qVKX3TQykgBhpwgDNdz aclrv5Lw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuOke-001iDA-CC; Fri, 27 May 2022 01:26:52 +0000 Date: Fri, 27 May 2022 02:26:52 +0100 From: Matthew Wilcox To: Ira Weiny Cc: linux-mm@kvack.org, "Fabio M. De Francesco" Subject: Re: Should we delete memmove_page? Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: 6kunw5z8hwtmtycaa5zo1bausxgiwksh X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=I+RREeLb; dmarc=none; spf=none (imf18.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 736151C0028 X-HE-Tag: 1653616154-353320 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, May 26, 2022 at 05:40:44PM -0700, Ira Weiny wrote: > On Thu, May 26, 2022 at 03:48:28PM +0100, Matthew Wilcox wrote: > > > > I was looking at memmove_page() and it occurred to me that it can't > > actually work, > > Oh wow yea. Because you can't unmap that address correctly. I don't understand what you mean ... you can unmap the address, it's just that memmove can't know that the two virtual ranges actually overlap physically. > Yes deletion is best. But... > > copy_user_highpage() > copy_highpage() > > ... might suffer from the same potential issue should a user not realize. I > think memcpy_page() by virtue of the name. Umm? They're all using memcpy(), so the caller must guarantee that the physical addresses are different. > I could not say anything at LSFmm because the Outreachy interns had not been > announced but I've selected Fabio to help with the highmem rework through that > program. Excellent! I advised Fabio last year, and I think he'll do a sterling job this year. > Would you like Fabio or I to send a patch? I think the main thing right now is > to just drop the memmove_page() Sure, just stick my Reported-by: on it.