Re: [RFC] Should writes to /dev/urandom immediately affect reads?

From: Eric Biggers
Date: Wed Sep 20 2023 - 16:45:30 EST


On Wed, Sep 20, 2023 at 01:32:29PM -0700, Linus Torvalds wrote:
> On Wed, 20 Sept 2023 at 13:21, Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
> >
> > It seems that what you're claiming (in addition to the RNG always being
> > initialized quickly on platforms that are "relevant", whatever that means) is
> > that once the RNG is "initialized", there's no need to reseed it anymore.
>
> No. You are literally putting words in my mouth that I at no point
> even implied. You're making up an argument.
>
> I *LITERALLY* am asking a very simple question: WHO DO YOU EVEN CARE
> ABOUT THIS "IMMEDIATE" EFFECT.
>
> Give me a real reason. Give me *any* reason.
>
> Don't try to turn this into some other discussion. I'm asking WHY DOES
> ANY OF THIS MATTER?
>
> The immediacy has changed several times, as you yourself lined up. And
> as far as I can tell, none of this matter in the least.
>
> > The question is, given that, shouldn't the RNG also reseed right
> > away when userspace explicitly adds something to it
>
> I don't see that there is any "given" at all.
>
> We do re-seed regularly. I'm not arguing against that.
>
> I'm literally arguing against applying random changes without giving
> any actual reason for them.
>
> Which is why I'm asking "why do you care"? Give em a *reason*. Why
> would a user space write matter at all?
>
> It was why I also asked about entropy. Because *if* you argue that the
> user-space write contains entropy, then that would be a reason.
>
> You didn't.
>
> You argue that the current behavior hasn't been the universal behavior. I agree.
>
> But considering that we've switched behaviors apparently at least
> three times, and at no point did it make any difference, my argument
> is really that without a *REASON*, why would we switch behavior *four*
> times?
>
> Is it just "four changes is better than three"?

See my first email where I explained the problems with the current behavior.
Especially the third paragraph.

I'll just wait until Jason has a chance to reply. This discussion clearly isn't
achieving anything with just us two.

- Eric