From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [PATCH] random / hw_random: core: start hwrng kthread also for untrusted sources
Date: Wed, 7 Sep 2022 15:05:20 +0200 [thread overview]
Message-ID: <YxiXEJ6up6XEW8SM@zx2c4.com> (raw)
In-Reply-To: <YxhAEmtVcdvIkX6Q@shine.dominikbrodowski.net>
On Wed, Sep 07, 2022 at 08:54:10AM +0200, Dominik Brodowski wrote:
> Am Wed, Sep 07, 2022 at 02:34:01PM +0800 schrieb Herbert Xu:
> > Dominik Brodowski <linux@dominikbrodowski.net> wrote:
> > >
> > > diff --git a/drivers/char/random.c b/drivers/char/random.c
> > > index 79d7d4e4e582..b360ed4ece03 100644
> > > --- a/drivers/char/random.c
> > > +++ b/drivers/char/random.c
> > > @@ -867,9 +867,9 @@ void add_hwgenerator_randomness(const void *buf, size_t len, size_t entropy)
> > >
> > > /*
> > > * Throttle writing to once every CRNG_RESEED_INTERVAL, unless
> > > - * we're not yet initialized.
> > > + * we're not yet initialized or this source isn't trusted.
> > > */
> > > - if (!kthread_should_stop() && crng_ready())
> > > + if (!kthread_should_stop() && (crng_ready() || !entropy))
> > > schedule_timeout_interruptible(CRNG_RESEED_INTERVAL);
> > > }
> > > EXPORT_SYMBOL_GPL(add_hwgenerator_randomness);
> >
> > Couldn't you split this bit out?
>
> I could, but this would need to get merged before the patch to the hwrng
> core gets applied. What do you (and Jason) prefer?
Just split this out and send it to me, and I'll push it early in 6.1 so
that it makes rc1, and then Herbert can apply the hwrng part separately
whenever he sees fit.
Jason
next prev parent reply other threads:[~2022-09-07 13:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 8:02 Dominik Brodowski
2022-09-07 6:34 ` Herbert Xu
2022-09-07 6:54 ` Dominik Brodowski
2022-09-07 13:05 ` Jason A. Donenfeld [this message]
2022-09-20 14:21 ` Jason A. Donenfeld
2022-09-20 14:21 ` [PATCH v2] " Jason A. Donenfeld
2022-09-22 13:59 ` [PATCH v3] " Dominik Brodowski
2022-09-30 6:15 ` Herbert Xu
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=YxiXEJ6up6XEW8SM@zx2c4.com \
--to=jason@zx2c4.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
/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
all inboxes | Powered by JetHome®