RE: [PATCH 04/11] iov_iter: explicitly check for CHECK_IOVEC_ONLY in rw_copy_check_uvector

2020-09-21 Thread David Laight
From: Al Viro > Sent: 21 September 2020 16:11 > On Mon, Sep 21, 2020 at 03:05:32PM +, David Laight wrote: > > > I've actually no idea: > > 1) Why there is an access_ok() check here. > >It will be repeated by the user copy functions. > > Early sanity check. > > > 2) Why it isn't done when

Re: [PATCH 04/11] iov_iter: explicitly check for CHECK_IOVEC_ONLY in rw_copy_check_uvector

2020-09-21 Thread Al Viro
On Mon, Sep 21, 2020 at 03:05:32PM +, David Laight wrote: > I've actually no idea: > 1) Why there is an access_ok() check here. >It will be repeated by the user copy functions. Early sanity check. > 2) Why it isn't done when called from mm/process_vm_access.c. >Ok, the addresses refe

Re: [PATCH 04/11] iov_iter: explicitly check for CHECK_IOVEC_ONLY in rw_copy_check_uvector

2020-09-21 Thread Al Viro
On Mon, Sep 21, 2020 at 04:34:27PM +0200, Christoph Hellwig wrote: > Explicitly check for the magic value insted of implicitly relying on > its numeric representation. Also drop the rather pointless unlikely > annotation. See above - I would rather have CHECK_IOVEC_ONLY gone. The reason for doi

RE: [PATCH 04/11] iov_iter: explicitly check for CHECK_IOVEC_ONLY in rw_copy_check_uvector

2020-09-21 Thread David Laight
From: Christoph Hellwig > Sent: 21 September 2020 15:34 > > Explicitly check for the magic value insted of implicitly relying on > its numeric representation. Also drop the rather pointless unlikely > annotation. > > Signed-off-by: Christoph Hellwig > --- > lib/iov_iter.c | 5 ++--- > 1 file

[PATCH 04/11] iov_iter: explicitly check for CHECK_IOVEC_ONLY in rw_copy_check_uvector

2020-09-21 Thread Christoph Hellwig
Explicitly check for the magic value insted of implicitly relying on its numeric representation. Also drop the rather pointless unlikely annotation. Signed-off-by: Christoph Hellwig --- lib/iov_iter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/iov_iter.c b/lib