From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jens Axboe <axboe@kernel.dk>,
tytso@mit.edu, hch@lst.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] random: convert to using fops->read_iter()
Date: Fri, 20 May 2022 11:14:49 +0200 [thread overview]
Message-ID: <YodcCV96t13O0Trl@zx2c4.com> (raw)
In-Reply-To: <YocGyl8mmG84tQD4@zeniv-ca.linux.org.uk>
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
next prev parent reply other threads:[~2022-05-20 9:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 23:31 [PATCHSET v2 0/2] Fix splice from random/urandom Jens Axboe
2022-05-19 23:31 ` [PATCH 1/2] random: convert to using fops->read_iter() Jens Axboe
2022-05-20 3:11 ` Al Viro
2022-05-20 3:26 ` Jens Axboe
2022-05-20 9:14 ` Jason A. Donenfeld [this message]
2022-05-19 23:31 ` [PATCH 2/2] random: wire up fops->splice_read_iter() Jens Axboe
2022-05-19 23:56 ` [PATCHSET v2 0/2] Fix splice from random/urandom Jason A. Donenfeld
2022-05-20 0:00 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2022-05-19 19:31 [PATCHSET " Jens Axboe
2022-05-19 19:31 ` [PATCH 1/2] random: convert to using fops->read_iter() Jens Axboe
2022-05-19 23:12 ` Jason A. Donenfeld
2022-05-19 23:20 ` Jason A. Donenfeld
2022-05-19 23:21 ` Jens Axboe
2022-05-19 23:21 ` Jason A. Donenfeld
2022-05-19 23:21 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YodcCV96t13O0Trl@zx2c4.com \
--to=jason@zx2c4.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.