Thread (46 messages) 46 messages, 7 authors, 2021-09-13

Re: [git pull] iov_iter fixes

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2021-09-10 03:36:14
Also in: linux-fsdevel

On Thu, Sep 09, 2021 at 09:30:03PM -0600, Jens Axboe wrote:
quoted
Again, we should never, ever modify the iovec (or bvec, etc.) array in
->read_iter()/->write_iter()/->sendmsg()/etc. instances.  If you see
such behaviour anywhere, report it immediately.  Any such is a blatant
bug.
Yes that was wrong, the iovec is obviously const. But that really
doesn't change the original point, which was that copying the iov_iter
itself unconditionally would be miserable.
Might very well be true, but... won't your patch hit the reimport on
every short read?  And the cost of uaccess in there is *much* higher
than copying of 48 bytes into local variable...

Or am I misreading your patch?  Note that short reads on reaching
EOF are obviously normal - it's not a rare case at all.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help