]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: eseqiv - Offer normal cipher functionality without RNG
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 21 Jun 2015 11:11:47 +0000 (19:11 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 22 Jun 2015 07:49:28 +0000 (15:49 +0800)
commitf08edfecce2dc61d5adafcdc37ab2da869f09fd5
treeed684c45b2e32e3e8a2fdeb6ea909bed22a3ecad
parent4a363c1009cf9d31d0a5534b7ad8f547ef2f794e
crypto: eseqiv - Offer normal cipher functionality without RNG

The RNG may not be available during early boot, e.g., the relevant
modules may not be included in the initramfs.  As the RNG Is only
needed for IPsec, we should not let this prevent use of ciphers
without IV generators, e.g., for disk encryption.

This patch postpones the RNG allocation to the init function so
that one failure during early boot does not make the RNG unavailable
for all subsequent users of the same cipher.

More importantly, it lets the cipher live even if RNG allocation
fails.  Of course we no longer offer IV generation and which will
fail with an error if invoked.  But all other cipher capabilities
will function as usual.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/eseqiv.c