Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1642737
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] [iov_iter] use memmove() when copying to/from user page |
| Date | 2017-05-16 20:50 +0200 |
| Message-ID | <tHPHI-IC-11@gated-at.bofh.it> (permalink) |
| References | <tHJLZ-5yL-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] [iov_iter] use memmove() when copying to/from user page Alexander Potapenko <glider@google.com> - 2017-05-16 14:30 +0200
Re: [PATCH] [iov_iter] use memmove() when copying to/from user page Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-16 20:50 +0200
Re: [PATCH] [iov_iter] use memmove() when copying to/from user page Dmitry Vyukov <dvyukov@google.com> - 2017-05-16 21:00 +0200
Re: [PATCH] [iov_iter] use memmove() when copying to/from user page Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-16 21:40 +0200
Re: [PATCH] [iov_iter] use memmove() when copying to/from user page Dmitry Vyukov <dvyukov@google.com> - 2017-05-16 22:20 +0200
Re: [PATCH] [iov_iter] use memmove() when copying to/from user page Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-16 23:00 +0200
Re: [PATCH] [iov_iter] use memmove() when copying to/from user page Dmitry Vyukov <dvyukov@google.com> - 2017-05-16 23:10 +0200
Re: [PATCH] [iov_iter] use memmove() when copying to/from user page Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-16 23:40 +0200
Re: [PATCH] [iov_iter] use memmove() when copying to/from user page Dmitry Vyukov <dvyukov@google.com> - 2017-05-17 00:20 +0200
Re: [PATCH] [iov_iter] use memmove() when copying to/from user page Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-17 00:50 +0200
csiph-web