linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Louis Collard <louiscollard@chromium.org>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: linux-integrity@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	Andrey Pronin <apronin@chromium.org>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	"David R. Bild" <david.bild@xaptum.com>,
	PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Michael Buesch <m@bues.ch>,
	Arvind Yadav <arvind.yadav.cs@gmail.com>,
	Gary R Hook <gary.hook@amd.com>
Subject: Re: [PATCH] Allow hwrng to initialize crng.
Date: Fri, 5 Oct 2018 09:45:57 +0800	[thread overview]
Message-ID: <CAKNRAJVibJ0VnxbEiWR_8_q3FzKHT+Q9etcnqJ8Fny40p_cx8g@mail.gmail.com> (raw)
In-Reply-To: <20180926103521.GB4885@linux.intel.com>

On Wed, Sep 26, 2018 at 6:35 PM Jarkko Sakkinen
<jarkko.sakkinen@linux.intel.com> wrote:
>
> On Wed, Sep 26, 2018 at 11:24:55AM +0800, Louis Collard wrote:
> > Some systems, for example embedded systems, do not generate
> > enough entropy on boot through interrupts, and boot may be blocked for
> > several minutes waiting for a call to getrandom to complete.
> >
> > Currently, random data is read from a hwrng when it is registered,
> > and is loaded into primary_crng. This data is treated in the same
> > way as data that is device-specific but otherwise unchanging, and
> > so primary_crng cannot become initialized with the data from the
> > hwrng.
> >
> > This change causes the data initially read from the hwrng to be
> > treated the same as subsequent data that is read from the hwrng if
> > it's quality score is non-zero.
> >
> > The implications of this are:
> >
> > The data read from hwrng can cause primary_crng to become
> > initialized, therefore avoiding problems of getrandom blocking
> > on boot.
> >
> > Calls to getrandom (with GRND_RANDOM) may be using entropy
> > exclusively (or in practise, almost exclusively) from the hwrng.
> >
> > Regarding the latter point; this behavior is the same as if a
> > user specified a quality score of 1 (bit of entropy per 1024 bits)
> > so hopefully this is not too scary a change to make.
> >
> > This change is the result of the discussion here:
> > https://patchwork.kernel.org/patch/10453893/
> >
> > Signed-off-by: Louis Collard <louiscollard@chromium.org>
>
> Acked-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
>
> /Jarkko

Thanks!

Adding a few people I think I should have included previously - I'm
new to this process so apologies for any missteps; please let me know
if there is anything else I can / should be doing!

  reply	other threads:[~2018-10-05  1:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26  3:24 [PATCH] Allow hwrng to initialize crng Louis Collard
2018-09-26 10:35 ` Jarkko Sakkinen
2018-10-05  1:45   ` Louis Collard [this message]
2018-11-17 20:15 ` Michael Niewöhner
2018-12-13  4:50   ` Louis Collard
2018-12-15 17:11     ` Michael Niewöhner
2018-12-15 18:20       ` Michael Niewöhner

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=CAKNRAJVibJ0VnxbEiWR_8_q3FzKHT+Q9etcnqJ8Fny40p_cx8g@mail.gmail.com \
    --to=louiscollard@chromium.org \
    --cc=apronin@chromium.org \
    --cc=arnd@arndb.de \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=david.bild@xaptum.com \
    --cc=gary.hook@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m@bues.ch \
    --cc=prasannatsmkumar@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).