[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+bk_LUSxm1DrGQTpXOUtkNvhJAbxmYi67wX7+mEb3h_gA@mail.gmail.com>
Date: Tue, 16 May 2017 15:15:16 -0700
From: Dmitry Vyukov <dvyukov@...gle.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Alexander Potapenko <glider@...gle.com>,
Kostya Serebryany <kcc@...gle.com>,
Eric Dumazet <edumazet@...gle.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [iov_iter] use memmove() when copying to/from user page
On Tue, May 16, 2017 at 2:33 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
> 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.
I missed that.
I assumed that in the case of sendfile from memfd to memfd data will
be copied directly. But it goes through a pipe with multiple buffers.
Does not look easily fixable.
Powered by blists - more mailing lists