Skip to content

Commit b6263eb

Browse files
abajkgregkh
authored andcommitted
crypto: inside-secure/eip93 - register hash before authenc algorithms
[ Upstream commit 5377032 ] 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: 9739f5f ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4ad705f commit b6263eb

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

drivers/crypto/inside-secure/eip93/eip93-main.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ static struct eip93_alg_template *eip93_algs[] = {
3636
&eip93_alg_cbc_aes,
3737
&eip93_alg_ctr_aes,
3838
&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,
3947
&eip93_alg_authenc_hmac_md5_cbc_des,
4048
&eip93_alg_authenc_hmac_sha1_cbc_des,
4149
&eip93_alg_authenc_hmac_sha224_cbc_des,
@@ -52,14 +60,6 @@ static struct eip93_alg_template *eip93_algs[] = {
5260
&eip93_alg_authenc_hmac_sha1_rfc3686_aes,
5361
&eip93_alg_authenc_hmac_sha224_rfc3686_aes,
5462
&eip93_alg_authenc_hmac_sha256_rfc3686_aes,
55-
&eip93_alg_md5,
56-
&eip93_alg_sha1,
57-
&eip93_alg_sha224,
58-
&eip93_alg_sha256,
59-
&eip93_alg_hmac_md5,
60-
&eip93_alg_hmac_sha1,
61-
&eip93_alg_hmac_sha224,
62-
&eip93_alg_hmac_sha256,
6363
};
6464

6565
inline void eip93_irq_disable(struct eip93_device *eip93, u32 mask)

0 commit comments

Comments
 (0)