[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YTrSqvkaWWn61Mzi@zeniv-ca.linux.org.uk>
Date: Fri, 10 Sep 2021 03:36:10 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Jens Axboe <axboe@...nel.dk>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Pavel Begunkov <asml.silence@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [git pull] iov_iter fixes
On Thu, Sep 09, 2021 at 09:30:03PM -0600, Jens Axboe wrote:
> > 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.
Powered by blists - more mailing lists