linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "Sverdlin,
	Alexander (Nokia - DE/Ulm)" <alexander.sverdlin@nokia.com>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	Matt Mackall <mpm@selenic.com>, Vitaly Andrianov <vitalya@ti.com>
Subject: Re: [PATCH] hwrng: ks-sa: Add minimum sleep time before ready-polling
Date: Fri, 15 Nov 2019 23:32:29 -0800	[thread overview]
Message-ID: <20191116073229.GA161720@sol.localdomain> (raw)
In-Reply-To: <20191115060610.2sjw7stopxr73jhn@gondor.apana.org.au>

On Fri, Nov 15, 2019 at 02:06:10PM +0800, Herbert Xu wrote:
> On Wed, Nov 06, 2019 at 09:30:49AM +0000, Sverdlin, Alexander (Nokia - DE/Ulm) wrote:
> > From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> > 
> > Current polling timeout is 25 us. The hardware is currently configured to
> > harvest the entropy for 81920 us. This leads to timeouts even during
> > blocking read (wait=1).
> > 
> > Log snippet:
> > [    5.727589] [<c040ffcc>] (ks_sa_rng_probe) from [<c04181e8>] (platform_drv_probe+0x58/0xb4)
> > ...
> > [    5.727805] hwrng: no data available
> > ...
> > [   13.157016] random: systemd: uninitialized urandom read (16 bytes read)
> > [   13.157033] systemd[1]: Initializing machine ID from random generator.
> > ...
> > [   15.848770] random: fast init done
> > ...
> > [   15.848807] random: crng init done
> > 
> > After the patch:
> > [    6.223534] random: systemd: uninitialized urandom read (16 bytes read)
> > [    6.223551] systemd[1]: Initializing machine ID from random generator.
> > ...
> > [    6.876075] random: fast init done
> > ...
> > [    6.954200] random: systemd: uninitialized urandom read (16 bytes read)
> > [    6.955244] random: systemd: uninitialized urandom read (16 bytes read)
> > ...
> > [    7.121948] random: crng init done
> > 
> > Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> > ---
> >  drivers/char/hw_random/ks-sa-rng.c | 38 ++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 38 insertions(+)
> 
> Patch applied.  Thanks.

This is causing a build error.  Seems that a line of the patch in
ks_sa_rng_init() went missing when it was applied...?

drivers/char/hw_random/ks-sa-rng.c: In function 'ks_sa_rng_init':
drivers/char/hw_random/ks-sa-rng.c:146:47: error: 'clk_rate' undeclared (first use in this function)
  146 |  ks_sa_rng->refill_delay_ns = refill_delay_ns(clk_rate);
      |                                               ^~~~~~~~
drivers/char/hw_random/ks-sa-rng.c:146:47: note: each undeclared identifier is reported only once for each function it appears in

  reply	other threads:[~2019-11-16  7:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  9:30 [PATCH] hwrng: ks-sa: Add minimum sleep time before ready-polling Sverdlin, Alexander (Nokia - DE/Ulm)
2019-11-15  6:06 ` Herbert Xu
2019-11-16  7:32   ` Eric Biggers [this message]
2019-11-17  0:42     ` Herbert Xu
2019-11-17  0:43       ` [PATCH] hwrng: ks-sa - Enable COMPILE_TEST Herbert Xu
2019-11-18 12:05         ` Sverdlin, Alexander (Nokia - DE/Ulm)

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=20191116073229.GA161720@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=alexander.sverdlin@nokia.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=vitalya@ti.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).