[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170516184821.GQ390@ZenIV.linux.org.uk>
Date: Tue, 16 May 2017 19:48:21 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Alexander Potapenko <glider@...gle.com>
Cc: dvyukov@...gle.com, kcc@...gle.com, edumazet@...gle.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [iov_iter] use memmove() when copying to/from user page
On Tue, May 16, 2017 at 02:27:34PM +0200, Alexander Potapenko wrote:
> It's possible that calling sendfile() to copy the data from a memfd to
> itself may result in doing a memcpy() with overlapping arguments.
> To avoid undefined behavior here, replace memcpy() with memmove() and
> rename memcpy_to_page()/memcpy_from_page() accordingly.
Er... And what semantics would you assign to such sendfile()? I really
want to see details, because it sounds like memmove() here will not be
any more useful than memcpy() - you still can esily get odd behaviour.
Powered by blists - more mailing lists