From: Al Viro <viro@zeniv.linux.org.uk>
To: Jens Axboe <axboe@kernel.dk>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] random: convert to using fops->write_iter()
Date: Fri, 20 May 2022 03:31:40 +0000 [thread overview]
Message-ID: <YocLnFa8mRpOkCZ5@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <e70dfd3b-c2a6-d830-e3a0-6a25f0da9256@kernel.dk>
On Thu, May 19, 2022 at 09:25:30PM -0600, Jens Axboe wrote:
> > Feed it a buffer with only 1 byte mapped, watch it'll pass to mix_pool_bytes().
> > And see how much of 'block' has been used uninitialized...
>
> I don't follow? Buffer with 1 byte, iter setup with 1 byte. We copy 1 byte,
> and we pass 1 byte to mix_pool_bytes(). What am I missing?
"only 1 byte mapped" != "len is 1"... Anonymous mmap() of 2*PAGE_SIZE, munmap()
the second half, ask that sucker to write PAGE_SIZE from buffer + PAGE_SIZE - 1...
prev parent reply other threads:[~2022-05-20 3:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 23:43 [PATCH] random: convert to using fops->write_iter() Jens Axboe
2022-05-19 23:52 ` Jens Axboe
2022-05-20 0:08 ` Jason A. Donenfeld
2022-05-20 0:32 ` Jens Axboe
2022-05-20 0:18 ` Jason A. Donenfeld
2022-05-20 0:32 ` Jens Axboe
2022-05-20 3:01 ` Al Viro
2022-05-20 3:25 ` Jens Axboe
2022-05-20 3:31 ` Al Viro [this message]
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=YocLnFa8mRpOkCZ5@zeniv-ca.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=Jason@zx2c4.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox