Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Robert Hancock <robert.hancock@calian.com>
To: "aymen.sghaier@nxp.com" <aymen.sghaier@nxp.com>,
	"horia.geanta@nxp.com" <horia.geanta@nxp.com>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: iMX6D CAAM RNG problems in v5.10.1
Date: Tue, 15 Dec 2020 23:31:19 +0000	[thread overview]
Message-ID: <00b1daa3cbd4b9eada873e5ef95f89fd2e5cee87.camel@calian.com> (raw)

Hello,

We have an iMX6D-based board which was previously using 5.4.x kernels.
I have recently started testing v5.10.1 on this board and am running
into an issue with the CAAM RNG. The dmesg is getting output like this
and all reads from /dev/hwrng are failing with EINVAL:

[   17.368368] caam_jr 2101000.jr: 2000025b: CCB: desc idx 2: RNG:
Hardware error
[   17.375721] hwrng: no data available
[   23.200255] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
Hardware error
[   23.215508] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
Hardware error
[   23.229249] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
Hardware error
[   23.243415] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
Hardware error
[   23.257809] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
Hardware error
[   23.272109] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
Hardware error

We are not using secure boot presently, if that matters. On 5.4, no
such issues and /dev/hwrng seems to work fine.

I see there are some CAAM RNG changes between 5.4 and 5.10 but not sure
which might be the cause?

The CAAM initialization output on boot (same on working 5.4 and non-
working 5.10.1 kernels):

[   16.934253] caam 2100000.crypto: Entropy delay = 3200
[   17.000146] caam 2100000.crypto: Instantiated RNG4 SH0
[   17.060911] caam 2100000.crypto: Instantiated RNG4 SH1
[   17.067891] caam 2100000.crypto: device ID = 0x0a16010000000000 (Era
4)
[   17.080289] caam 2100000.crypto: job rings = 2, qi = 0
[   17.113498] caam algorithms registered in /proc/crypto
[   17.120099] caam 2100000.crypto: registering rng-caam

-- 
Robert Hancock
Senior Hardware Designer, Calian Advanced Technologies
www.calian.com

             reply	other threads:[~2020-12-16  0:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 23:31 Robert Hancock [this message]
2020-12-15 23:53 ` iMX6D CAAM RNG problems in v5.10.1 Robert Hancock

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=00b1daa3cbd4b9eada873e5ef95f89fd2e5cee87.camel@calian.com \
    --to=robert.hancock@calian.com \
    --cc=aymen.sghaier@nxp.com \
    --cc=horia.geanta@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    /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