Skip to content

Commit 863b557

Browse files
youquan-songherbertx
authored andcommitted
crypto: testmgr - Fix complain about lack test for internal used algorithm
When load aesni-intel and ghash_clmulni-intel driver,kernel will complain no test for some internal used algorithm. The strange information as following: alg: No test for __aes-aesni (__driver-aes-aesni) alg: No test for __ecb-aes-aesni (__driver-ecb-aes-aesni) alg: No test for __cbc-aes-aesni (__driver-cbc-aes-aesni) alg: No test for __ecb-aes-aesni (cryptd(__driver-ecb-aes-aesni) alg: No test for __ghash (__ghash-pclmulqdqni) alg: No test for __ghash (cryptd(__ghash-pclmulqdqni)) This patch add NULL test entries for these algorithm and driver. Signed-off-by: Youquan, Song <[email protected]> Signed-off-by: Ying, Huang <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent d2392ba commit 863b557

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

crypto/testmgr.c

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,9 +1477,54 @@ static int alg_test_cprng(const struct alg_test_desc *desc, const char *driver,
14771477
return err;
14781478
}
14791479

1480+
static int alg_test_null(const struct alg_test_desc *desc,
1481+
const char *driver, u32 type, u32 mask)
1482+
{
1483+
return 0;
1484+
}
1485+
14801486
/* Please keep this list sorted by algorithm name. */
14811487
static const struct alg_test_desc alg_test_descs[] = {
14821488
{
1489+
.alg = "__driver-cbc-aes-aesni",
1490+
.test = alg_test_null,
1491+
.suite = {
1492+
.cipher = {
1493+
.enc = {
1494+
.vecs = NULL,
1495+
.count = 0
1496+
},
1497+
.dec = {
1498+
.vecs = NULL,
1499+
.count = 0
1500+
}
1501+
}
1502+
}
1503+
}, {
1504+
.alg = "__driver-ecb-aes-aesni",
1505+
.test = alg_test_null,
1506+
.suite = {
1507+
.cipher = {
1508+
.enc = {
1509+
.vecs = NULL,
1510+
.count = 0
1511+
},
1512+
.dec = {
1513+
.vecs = NULL,
1514+
.count = 0
1515+
}
1516+
}
1517+
}
1518+
}, {
1519+
.alg = "__ghash-pclmulqdqni",
1520+
.test = alg_test_null,
1521+
.suite = {
1522+
.hash = {
1523+
.vecs = NULL,
1524+
.count = 0
1525+
}
1526+
}
1527+
}, {
14831528
.alg = "ansi_cprng",
14841529
.test = alg_test_cprng,
14851530
.fips_allowed = 1,
@@ -1622,6 +1667,30 @@ static const struct alg_test_desc alg_test_descs[] = {
16221667
.count = CRC32C_TEST_VECTORS
16231668
}
16241669
}
1670+
}, {
1671+
.alg = "cryptd(__driver-ecb-aes-aesni)",
1672+
.test = alg_test_null,
1673+
.suite = {
1674+
.cipher = {
1675+
.enc = {
1676+
.vecs = NULL,
1677+
.count = 0
1678+
},
1679+
.dec = {
1680+
.vecs = NULL,
1681+
.count = 0
1682+
}
1683+
}
1684+
}
1685+
}, {
1686+
.alg = "cryptd(__ghash-pclmulqdqni)",
1687+
.test = alg_test_null,
1688+
.suite = {
1689+
.hash = {
1690+
.vecs = NULL,
1691+
.count = 0
1692+
}
1693+
}
16251694
}, {
16261695
.alg = "ctr(aes)",
16271696
.test = alg_test_skcipher,
@@ -1668,6 +1737,21 @@ static const struct alg_test_desc alg_test_descs[] = {
16681737
}
16691738
}
16701739
}
1740+
}, {
1741+
.alg = "ecb(__aes-aesni)",
1742+
.test = alg_test_null,
1743+
.suite = {
1744+
.cipher = {
1745+
.enc = {
1746+
.vecs = NULL,
1747+
.count = 0
1748+
},
1749+
.dec = {
1750+
.vecs = NULL,
1751+
.count = 0
1752+
}
1753+
}
1754+
}
16711755
}, {
16721756
.alg = "ecb(aes)",
16731757
.test = alg_test_skcipher,

0 commit comments

Comments
 (0)