Skip to contentSkip to conversation

crypto: caam: set hwrng quality level

PATCH In review Philipp Puschmann 2 participants 2 messages Feb 13, 2019 – Feb 19, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: caam: set hwrng quality level

When quality is set to 0 this driver is not used as randomness source by HWRNG framework at all. So set the quality and finally make this driver work. The value of the quality was discussed before
( see https://patchwork.kernel.org/patch/9850669/ ) and it is still a rough value.

---
 drivers/crypto/caam/caamrng.c | 1 +
 1 file changed, 1 insertion(+)
drivers/crypto/caam/caamrng.c +1 -0
index a387c8d49a62..b6fd60f7638e 100644
@@ -294,6 +294,7 @@ static struct hwrng caam_rng = {
 	.name		= "rng-caam",
 	.cleanup	= caam_cleanup,
 	.read		= caam_read,
+	.quality	= 990,
 };
 
 static void __exit caam_rng_exit(void)
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 6 lines · Philipp Puschmann

When quality is set to 0 this driver is not used as randomness source by HWRNG framework at all. So set the quality and finally make this driver work. The value of the quality was discussed before
( see see https://patchwork.kernel.org/patch/9850669/ ) and it is still a rough value.

In the same thread you mention, the conclusion is that caamrng should be properly configured (TRNG instead of DRBG) before claiming to be a reliable hwrng entropy source.

Horia