[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9oo5y08skaOOXg-q0T9pDs580dOotm6Wz0t96AssZr2Pw@mail.gmail.com>
Date: Thu, 10 Feb 2022 14:09:49 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Dominik Brodowski <linux@...inikbrodowski.net>
Cc: LKML <linux-kernel@...r.kernel.org>,
"Theodore Ts'o" <tytso@....edu>
Subject: Re: [PATCH] random: tie batched entropy generation to base_crng generation
Hi Dominik,
On Thu, Feb 10, 2022 at 7:04 AM Dominik Brodowski
<linux@...inikbrodowski.net> wrote:
> Here we do not need to take a lock (single-threaded operation), can only be
> at generation 0 or 1, and the base_crng.key has changed. Which leads me to
> ask: shouldn't we increase the generation counter always (or at least if
> arch_init is true)? And just make icnrementing crng_init to 2 depending on
> trust_cpu?
Interesting consideration. I think incrementing the generation counter
there unconditionally can't hurt. It should be done every time the
base_crng key changes, which there it clearly does since we're
extracting into it. I'll go ahead and do that.
Jason
Powered by blists - more mailing lists