Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: inside-secure/eip93 - register hash before authenc algorithms

Register hash before hmac and authenc algorithms. This will ensure
selftests pass at startup. Previously, selftests failed on the
crypto_alloc_ahash() function since the associated algorithm was
not yet registered.

Fixes following error:
...
[ 18.375811] alg: self-tests for authenc(hmac(sha1),cbc(aes)) using authenc(hmac(sha1-eip93),cbc(aes-eip93)) failed (rc=-2)
[ 18.382140] alg: self-tests for authenc(hmac(sha224),rfc3686(ctr(aes))) using authenc(hmac(sha224-eip93),rfc3686(ctr(aes-eip93))) failed (rc=-2)
[ 18.395029] alg: aead: authenc(hmac(sha256-eip93),cbc(des-eip93)) setkey failed on test vector 0; expected_error=0, actual_error=-2, flags=0x1
[ 18.409734] alg: aead: authenc(hmac(md5-eip93),cbc(des3_ede-eip93)) setkey failed on test vector 0; expected_error=0, actual_error=-2, flags=0x1
...

Fixes: 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Aleksander Jan Bajkowski and committed by
Herbert Xu
53770329 f4abb1af

+8 -8
+8 -8
drivers/crypto/inside-secure/eip93/eip93-main.c
··· 36 36 &eip93_alg_cbc_aes, 37 37 &eip93_alg_ctr_aes, 38 38 &eip93_alg_rfc3686_aes, 39 + &eip93_alg_md5, 40 + &eip93_alg_sha1, 41 + &eip93_alg_sha224, 42 + &eip93_alg_sha256, 43 + &eip93_alg_hmac_md5, 44 + &eip93_alg_hmac_sha1, 45 + &eip93_alg_hmac_sha224, 46 + &eip93_alg_hmac_sha256, 39 47 &eip93_alg_authenc_hmac_md5_cbc_des, 40 48 &eip93_alg_authenc_hmac_sha1_cbc_des, 41 49 &eip93_alg_authenc_hmac_sha224_cbc_des, ··· 60 52 &eip93_alg_authenc_hmac_sha1_rfc3686_aes, 61 53 &eip93_alg_authenc_hmac_sha224_rfc3686_aes, 62 54 &eip93_alg_authenc_hmac_sha256_rfc3686_aes, 63 - &eip93_alg_md5, 64 - &eip93_alg_sha1, 65 - &eip93_alg_sha224, 66 - &eip93_alg_sha256, 67 - &eip93_alg_hmac_md5, 68 - &eip93_alg_hmac_sha1, 69 - &eip93_alg_hmac_sha224, 70 - &eip93_alg_hmac_sha256, 71 55 }; 72 56 73 57 inline void eip93_irq_disable(struct eip93_device *eip93, u32 mask)