Re: [PATCH] crypto: caam - enable prediction resistance conditionally

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/28/2022 8:23 AM, Herbert Xu wrote:
> On Tue, Jan 11, 2022 at 09:41:04AM -0300, Fabio Estevam wrote:
>> From: Fabio Estevam <festevam@xxxxxxx>
>>
>> Since commit 358ba762d9f1 ("crypto: caam - enable prediction resistance
>> in HRWNG") the following CAAM errors can be seen on i.MX6:
>>
>> caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG: Hardware error
>> hwrng: no data available
>> caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG: Hardware error
>> hwrng: no data available
>> caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG: Hardware error
>> hwrng: no data available
>> caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG: Hardware error
>> hwrng: no data available
>>
>> OP_ALG_PR_ON is enabled unconditionally, which may cause the problem
>> on i.MX devices.
>>
What parts exactly?
Anything besides i.MX6 SX, S/DL?

>> Fix the problem by only enabling OP_ALG_PR_ON on platforms that have
>> Management Complex support.
>>
This limitation doesn't make any sense, it's too general.
Only a handful of Layerscape devices have MC, so all i.MX devices and
most LS devices will no longer have prediction resistance enabled.

>> Fixes: 358ba762d9f1 ("crypto: caam - enable prediction resistance in HRWNG")
>> Signed-off-by: Fabio Estevam <festevam@xxxxxxx>
>> ---
>>  drivers/crypto/caam/caamrng.c | 15 +++++++++++----
>>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> Patch applied.  Thanks.
We've been in contact with Fabio and we're working on a solution.
Now I realize the list hasn't been Cc-ed - sorry for the confusion
and for not providing an explicit Nack.

Herbert, could you please revert this patch?

It's doing more harm than good, since it's making the internal CAAM RNG
work like a DRBG / PRNG (instead of TRNG) while the driver registers
to hwrng as an entropy source.

Thanks,
Horia



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux