diff options
author | Milan Broz <mbroz@redhat.com> | 2012-06-29 16:08:09 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-07-10 23:06:15 -0400 |
commit | 6c79294f44fd7d1122cbaabff3b9815b074c0dd0 (patch) | |
tree | f9572a8056ab494a6191ea4bb8d53593feb9119c /crypto/testmgr.c | |
parent | b329669ea0b5b02efd41f94372bcf0e988814af4 (diff) |
crypto: testmgr - allow aesni-intel and ghash_clmulni-intel in fips mode
Patch 863b557a88f8c033f7419fabafef4712a5055f85 added NULL entries
for intel accelerated drivers but did not marked these fips allowed.
This cause panic if running tests with fips=1.
For ghash, fips_allowed flag was added in patch
18c0ebd2d8194cce4b3f67e2903fa01bea892cbc.
Without patch, "modprobe tcrypt" fails with
alg: skcipher: Failed to load transform for cbc-aes-aesni: -2
cbc-aes-aesni: cbc(aes) alg self test failed in fips mode!
(panic)
Also add missing cryptd(__driver-cbc-aes-aesni) and
cryptd(__driver-gcm-aes-aesni) test to complement
null tests above, otherwise system complains with
alg: No test for __cbc-aes-aesni (cryptd(__driver-cbc-aes-aesni))
alg: No test for __gcm-aes-aesni (cryptd(__driver-gcm-aes-aesni))
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Paul Wouters <pwouters@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/testmgr.c')
-rw-r--r-- | crypto/testmgr.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 36748a5996e2..4308a11f129c 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c | |||
@@ -1581,6 +1581,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
1581 | }, { | 1581 | }, { |
1582 | .alg = "__driver-cbc-aes-aesni", | 1582 | .alg = "__driver-cbc-aes-aesni", |
1583 | .test = alg_test_null, | 1583 | .test = alg_test_null, |
1584 | .fips_allowed = 1, | ||
1584 | .suite = { | 1585 | .suite = { |
1585 | .cipher = { | 1586 | .cipher = { |
1586 | .enc = { | 1587 | .enc = { |
@@ -1641,6 +1642,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
1641 | }, { | 1642 | }, { |
1642 | .alg = "__driver-ecb-aes-aesni", | 1643 | .alg = "__driver-ecb-aes-aesni", |
1643 | .test = alg_test_null, | 1644 | .test = alg_test_null, |
1645 | .fips_allowed = 1, | ||
1644 | .suite = { | 1646 | .suite = { |
1645 | .cipher = { | 1647 | .cipher = { |
1646 | .enc = { | 1648 | .enc = { |
@@ -1701,6 +1703,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
1701 | }, { | 1703 | }, { |
1702 | .alg = "__ghash-pclmulqdqni", | 1704 | .alg = "__ghash-pclmulqdqni", |
1703 | .test = alg_test_null, | 1705 | .test = alg_test_null, |
1706 | .fips_allowed = 1, | ||
1704 | .suite = { | 1707 | .suite = { |
1705 | .hash = { | 1708 | .hash = { |
1706 | .vecs = NULL, | 1709 | .vecs = NULL, |
@@ -1866,8 +1869,25 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
1866 | } | 1869 | } |
1867 | } | 1870 | } |
1868 | }, { | 1871 | }, { |
1872 | .alg = "cryptd(__driver-cbc-aes-aesni)", | ||
1873 | .test = alg_test_null, | ||
1874 | .fips_allowed = 1, | ||
1875 | .suite = { | ||
1876 | .cipher = { | ||
1877 | .enc = { | ||
1878 | .vecs = NULL, | ||
1879 | .count = 0 | ||
1880 | }, | ||
1881 | .dec = { | ||
1882 | .vecs = NULL, | ||
1883 | .count = 0 | ||
1884 | } | ||
1885 | } | ||
1886 | } | ||
1887 | }, { | ||
1869 | .alg = "cryptd(__driver-ecb-aes-aesni)", | 1888 | .alg = "cryptd(__driver-ecb-aes-aesni)", |
1870 | .test = alg_test_null, | 1889 | .test = alg_test_null, |
1890 | .fips_allowed = 1, | ||
1871 | .suite = { | 1891 | .suite = { |
1872 | .cipher = { | 1892 | .cipher = { |
1873 | .enc = { | 1893 | .enc = { |
@@ -1926,8 +1946,25 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
1926 | } | 1946 | } |
1927 | } | 1947 | } |
1928 | }, { | 1948 | }, { |
1949 | .alg = "cryptd(__driver-gcm-aes-aesni)", | ||
1950 | .test = alg_test_null, | ||
1951 | .fips_allowed = 1, | ||
1952 | .suite = { | ||
1953 | .cipher = { | ||
1954 | .enc = { | ||
1955 | .vecs = NULL, | ||
1956 | .count = 0 | ||
1957 | }, | ||
1958 | .dec = { | ||
1959 | .vecs = NULL, | ||
1960 | .count = 0 | ||
1961 | } | ||
1962 | } | ||
1963 | } | ||
1964 | }, { | ||
1929 | .alg = "cryptd(__ghash-pclmulqdqni)", | 1965 | .alg = "cryptd(__ghash-pclmulqdqni)", |
1930 | .test = alg_test_null, | 1966 | .test = alg_test_null, |
1967 | .fips_allowed = 1, | ||
1931 | .suite = { | 1968 | .suite = { |
1932 | .hash = { | 1969 | .hash = { |
1933 | .vecs = NULL, | 1970 | .vecs = NULL, |
@@ -2043,6 +2080,7 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
2043 | }, { | 2080 | }, { |
2044 | .alg = "ecb(__aes-aesni)", | 2081 | .alg = "ecb(__aes-aesni)", |
2045 | .test = alg_test_null, | 2082 | .test = alg_test_null, |
2083 | .fips_allowed = 1, | ||
2046 | .suite = { | 2084 | .suite = { |
2047 | .cipher = { | 2085 | .cipher = { |
2048 | .enc = { | 2086 | .enc = { |