From: Al Viro <viro@ZenIV.linux.org.uk>
To: Alexander Potapenko <glider@google.com>
Cc: dvyukov@google.com, kcc@google.com, edumazet@google.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [iov_iter] use memmove() when copying to/from user page
Date: Tue, 16 May 2017 19:48:21 +0100 [thread overview]
Message-ID: <20170516184821.GQ390@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20170516122734.56760-1-glider@google.com>
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.
next prev parent reply other threads:[~2017-05-16 18:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-16 12:27 Alexander Potapenko
2017-05-16 18:48 ` Al Viro [this message]
2017-05-16 18:53 ` Dmitry Vyukov
2017-05-16 19:37 ` Al Viro
2017-05-16 20:10 ` Dmitry Vyukov
2017-05-16 20:52 ` Al Viro
2017-05-16 21:01 ` Dmitry Vyukov
2017-05-16 21:33 ` Al Viro
2017-05-16 22:15 ` Dmitry Vyukov
2017-05-16 22:48 ` Al Viro
2017-05-25 17:04 ` Pavel Machek
2017-05-25 17:15 ` Eric Dumazet
2017-05-25 21:27 ` Pavel Machek
2017-05-25 18:22 ` Al Viro
2017-05-25 19:15 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170516184821.GQ390@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=dvyukov@google.com \
--cc=edumazet@google.com \
--cc=glider@google.com \
--cc=kcc@google.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome