3 @@ -108,6 +108,10 @@ config CRYPTO_MANAGER_DISABLE_TESTS
4 Disable run-time self tests that normally take place at
5 algorithm registration.
7 +config CRYPTO_MANAGER_NO_TESTS
8 + bool "Disable internal testsuite to save space"
9 + depends on CRYPTO_MANAGER
11 config CRYPTO_GF128MUL
12 tristate "GF(2^128) multiplication functions (EXPERIMENTAL)"
14 --- a/crypto/testmgr.c
15 +++ b/crypto/testmgr.c
16 @@ -65,6 +65,8 @@ int alg_test(const char *driver, const c
20 +#ifndef CONFIG_CRYPTO_MANAGER_NO_TESTS
22 struct tcrypt_result {
23 struct completion completion;
25 @@ -2508,8 +2510,11 @@ static int alg_find_test(const char *alg
29 +#endif /* CONFIG_CRYPTO_MANAGER_NO_TESTS */
31 int alg_test(const char *driver, const char *alg, u32 type, u32 mask)
33 +#ifndef CONFIG_CRYPTO_MANAGER_NO_TESTS
37 @@ -2564,6 +2569,9 @@ notest:
41 +#else /* CONFIG_CRYPTO_MANAGER_NO_TESTS */
43 +#endif /* CONFIG_CRYPTO_MANAGER_NO_TESTS */
46 #endif /* CONFIG_CRYPTO_MANAGER_DISABLE_TESTS */
47 --- a/crypto/testmgr.h
48 +++ b/crypto/testmgr.h
51 #include <crypto/compress.h>
53 +#ifndef CONFIG_CRYPTO_MANAGER_NO_TESTS
55 #define MAX_DIGEST_SIZE 64
58 @@ -9969,4 +9971,6 @@ static struct hash_testvec crc32c_tv_tem
62 +#endif /* CONFIG_CRYPTO_MANAGER_NO_TESTS */
64 #endif /* _CRYPTO_TESTMGR_H */