linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iMX6D CAAM RNG problems in v5.10.1
@ 2020-12-15 23:31 Robert Hancock
  2020-12-15 23:53 ` Robert Hancock
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Hancock @ 2020-12-15 23:31 UTC (permalink / raw)
  To: aymen.sghaier, horia.geanta; +Cc: linux-crypto

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: iMX6D CAAM RNG problems in v5.10.1
  2020-12-15 23:31 iMX6D CAAM RNG problems in v5.10.1 Robert Hancock
@ 2020-12-15 23:53 ` Robert Hancock
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Hancock @ 2020-12-15 23:53 UTC (permalink / raw)
  To: aymen.sghaier, horia.geanta; +Cc: l.stach, linux-crypto

Just saw Lucas Stach's post "CAAM RNG trouble" from yesterday which
seems to be describing this same issue - added to CC.

On Tue, 2020-12-15 at 17:31 -0600, Robert Hancock wrote:
> 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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-16  0:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 23:31 iMX6D CAAM RNG problems in v5.10.1 Robert Hancock
2020-12-15 23:53 ` Robert Hancock

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).