All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Theodore Ts'o <tytso@mit.edu>, Christoph Hellwig <hch@lst.de>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHSET 0/2] Fix splice from random/urandom
Date: Thu, 19 May 2022 18:02:55 -0600	[thread overview]
Message-ID: <13899409-e81b-8689-3380-249de46c0b6f@kernel.dk> (raw)
In-Reply-To: <CAHmME9qVQNkx-0J8rq_0ZVaSR+-eEgOUtcZhvq5dAY4-kJxSAA@mail.gmail.com>

On 5/19/22 6:00 PM, Jason A. Donenfeld wrote:
> Hi Jens,
> 
> On Fri, May 20, 2022 at 1:57 AM Jens Axboe <axboe@kernel.dk> wrote:
>>
>> On 5/19/22 5:27 PM, Jason A. Donenfeld wrote:
>>> Hi Jens,
>>>
>>> On Fri, May 20, 2022 at 1:25 AM Jens Axboe <axboe@kernel.dk> wrote:
>>>> I'll leave that to you :-)
>>>
>>> Alright, I'll have a look. Which one do I want here? This series adds
>>> splice_read/splice_write. The new thing would be sendpage? Or
>>> copy_file_range? Or something else?
>>
>> For copying kernel memory? It's really the same thing, you just
>> initialize the iter as an ITER_KVEC instead. The nice thing about the
>> iov_iter iterator that it then hides that for you, call the same copy
>> in/out helpers for it.
> 
> Err, maybe we're talking about different things? I was thinking about
> the plumbing to make splice/sendfile work on non-pipes.

Ah I see. sendfile() just uses splice() internally, so that'll work
(again) with my changes. splice(), by definition, either moves to and
from a pipe. Hence one of the fds must be a pipe. Does that answer the
question?

> get_random_bytes() itself doesn't need to become iovec'd, as that has
> no IO callers.

I was a little puzzled, but didn't look deeper and see if it would make
sense to do so.

-- 
Jens Axboe


  reply	other threads:[~2022-05-20  0:03 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 19:31 [PATCHSET 0/2] Fix splice from random/urandom 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
2022-05-19 19:31 ` [PATCH 2/2] random: wire up fops->splice_read_iter() Jens Axboe
2022-05-19 19:48 ` [PATCHSET 0/2] Fix splice from random/urandom Christoph Hellwig
2022-05-19 19:55   ` Jens Axboe
2022-05-20  6:02     ` Christoph Hellwig
2022-05-20 12:51       ` Jens Axboe
2022-05-19 20:05 ` Jason A. Donenfeld
2022-05-19 20:49   ` Jens Axboe
2022-05-19 21:02     ` Jens Axboe
2022-05-19 23:15       ` Jason A. Donenfeld
2022-05-19 23:22         ` Jens Axboe
2022-05-19 23:25           ` Jason A. Donenfeld
2022-05-19 23:33             ` Jens Axboe
2022-05-19 23:39               ` Jason A. Donenfeld
2022-05-19 23:44                 ` Jens Axboe
2022-05-19 23:13     ` Jason A. Donenfeld
2022-05-19 23:19       ` Jens Axboe
2022-05-19 23:23         ` Jason A. Donenfeld
2022-05-19 23:25           ` Jens Axboe
2022-05-19 23:27             ` Jason A. Donenfeld
2022-05-19 23:57               ` Jens Axboe
2022-05-20  0:00                 ` Jason A. Donenfeld
2022-05-20  0:02                   ` Jens Axboe [this message]
2022-05-20  0:48                     ` Jason A. Donenfeld
2022-05-20  0:56                       ` Jens Axboe
2022-05-20  1:00                         ` Jason A. Donenfeld
2022-05-20  1:05                           ` Jens Axboe
2022-05-20  1:10                           ` Jens Axboe
2022-05-20 12:43                             ` Jason A. Donenfeld
2022-05-20 12:49                               ` Jens Axboe
2022-05-20 13:04                                 ` Jason A. Donenfeld

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=13899409-e81b-8689-3380-249de46c0b6f@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Jason@zx2c4.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.