Re: [PATCH] random: convert to using fops->write_iter()

From: Al Viro
Date: Thu May 19 2022 - 23:31:50 EST


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...