From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750949AbdEPVdv (ORCPT ); Tue, 16 May 2017 17:33:51 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:33384 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751291AbdEPVdt (ORCPT ); Tue, 16 May 2017 17:33:49 -0400 Date: Tue, 16 May 2017 22:33:48 +0100 From: Al Viro To: Dmitry Vyukov Cc: Alexander Potapenko , Kostya Serebryany , Eric Dumazet , LKML Subject: Re: [PATCH] [iov_iter] use memmove() when copying to/from user page Message-ID: <20170516213347.GT390@ZenIV.linux.org.uk> References: <20170516122734.56760-1-glider@google.com> <20170516184821.GQ390@ZenIV.linux.org.uk> <20170516193750.GR390@ZenIV.linux.org.uk> <20170516205212.GS390@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 16, 2017 at 02:01:51PM -0700, Dmitry Vyukov wrote: > > In that case your patch does not suffice. Overlapping move _forwards_ still > > yields unexpected results, doesn't it? > > Why? memmove can move both ways. Do we need to change more memcpy's to > memmove's? Because it's not going to be *one* call of memcpy() or memmove(). It's one per page.