diff mbox series

crypto: caam: set hwrng quality level

Message ID 20190213144907.5696-1-philipp.puschmann@emlix.com (mailing list archive)
State Changes Requested
Delegated to: Herbert Xu
Headers show
Series crypto: caam: set hwrng quality level | expand

Commit Message

Philipp Puschmann Feb. 13, 2019, 2:49 p.m. UTC
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.

Signed-off-by: Philipp Puschmann <philipp.puschmann@emlix.com>
---
 drivers/crypto/caam/caamrng.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Horia Geanta Feb. 19, 2019, 6:57 a.m. UTC | #1
On 2/13/2019 4:49 PM, Philipp Puschmann wrote:
> 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
diff mbox series

Patch

diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c
index a387c8d49a62..b6fd60f7638e 100644
--- a/drivers/crypto/caam/caamrng.c
+++ b/drivers/crypto/caam/caamrng.c
@@ -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)