[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YodcCV96t13O0Trl@zx2c4.com>
Date: Fri, 20 May 2022 11:14:49 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Jens Axboe <axboe@...nel.dk>, tytso@....edu, hch@....de,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] random: convert to using fops->read_iter()
Hi Al,
On Fri, May 20, 2022 at 03:11:06AM +0000, Al Viro wrote:
> > SYSCALL_DEFINE3(getrandom, char __user *, ubuf, size_t, len,
> > unsigned int, flags) { + struct iovec iov = { .iov_base = ubuf };
> > + struct iov_iter iter;
>
> import_single_range(READ, ubuf, len, &iov, &iter)
>
> (note, BTW, that this'll cap len)
I'll incorporate this and send a v4. import_single_range does an
access_ok(), but I would hope that copy_to_iter() also does similar
checks. Does that make this less efficient?
Jason
Powered by blists - more mailing lists