Message ID | 7507652.XDRqQzIvs8@tachyon.chronox.de (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Herbert Xu |
Headers | show |
On Sat, Jun 06, 2015 at 04:20:35AM +0200, Stephan Mueller wrote: > When compiling the DRBG statically into the kernel, the testmgr > allocation of the DRBG may be done at a time the Jitter RNG is > not available. The testmgr instantiates a number of DRBGs for performing > testing which may cause a flurry of logs about unavailable Jitter RNG. > Note, the Jitter RNG is not needed for the testmgr operation anyways. I think we should fix by ensuring the jitter is registered first. You could try registering jitter at subsys_init instead of module_init. Cheers,
Am Montag, 8. Juni 2015, 09:33:55 schrieb Herbert Xu: Hi Herbert, > On Sat, Jun 06, 2015 at 04:20:35AM +0200, Stephan Mueller wrote: > > When compiling the DRBG statically into the kernel, the testmgr > > allocation of the DRBG may be done at a time the Jitter RNG is > > not available. The testmgr instantiates a number of DRBGs for performing > > testing which may cause a flurry of logs about unavailable Jitter RNG. > > Note, the Jitter RNG is not needed for the testmgr operation anyways. > > I think we should fix by ensuring the jitter is registered first. > You could try registering jitter at subsys_init instead of module_init. Thanks for the hint about the root cause. I will do that right away. > > Cheers,
diff --git a/crypto/drbg.c b/crypto/drbg.c index 7339cc5..3fed67e 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -1279,7 +1279,7 @@ static inline int drbg_alloc_state(struct drbg_state *drbg) drbg->jent = crypto_alloc_rng("jitterentropy_rng", 0, 0); if(IS_ERR(drbg->jent)) { - pr_info("DRBG: could not allocate Jitter RNG handle for seeding\n"); + pr_devel("DRBG: could not allocate Jitter RNG handle for seeding\n"); /* * As the Jitter RNG is a module that may not be present, we * continue with the operation and do not fully tie the DRBG
When compiling the DRBG statically into the kernel, the testmgr allocation of the DRBG may be done at a time the Jitter RNG is not available. The testmgr instantiates a number of DRBGs for performing testing which may cause a flurry of logs about unavailable Jitter RNG. Note, the Jitter RNG is not needed for the testmgr operation anyways. Signed-off-by: Stephan Mueller <smueller@chronox.de> --- crypto/drbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)