diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-02-03 03:38:26 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-02-03 03:38:26 +0000 |
commit | f87a4437ac2fcebae69def8839a020d5c3f63bd3 (patch) | |
tree | 6061fb196fc68e3c5f0969642fb25d45ca5fefef /target | |
parent | 085737e0b07e34dd0eac58a8882be126f1be993c (diff) | |
download | mtk-20170518-f87a4437ac2fcebae69def8839a020d5c3f63bd3.zip mtk-20170518-f87a4437ac2fcebae69def8839a020d5c3f63bd3.tar.gz mtk-20170518-f87a4437ac2fcebae69def8839a020d5c3f63bd3.tar.bz2 |
save space by making the crypto testsuite optional and disabled by default
SVN-Revision: 19502
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/generic-2.6/config-2.6.32 | 1 | ||||
-rw-r--r-- | target/linux/generic-2.6/patches-2.6.32/260-crypto_optional_tests.patch | 63 |
2 files changed, 64 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/config-2.6.32 b/target/linux/generic-2.6/config-2.6.32 index ac2fe66..f3d500f 100644 --- a/target/linux/generic-2.6/config-2.6.32 +++ b/target/linux/generic-2.6/config-2.6.32 @@ -391,6 +391,7 @@ CONFIG_CRYPTO_ALGAPI=y # CONFIG_CRYPTO_LZO is not set # CONFIG_CRYPTO_MANAGER2 is not set # CONFIG_CRYPTO_MANAGER is not set +CONFIG_CRYPTO_MANAGER_NO_TESTS=y # CONFIG_CRYPTO_MD4 is not set # CONFIG_CRYPTO_MD5 is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set diff --git a/target/linux/generic-2.6/patches-2.6.32/260-crypto_optional_tests.patch b/target/linux/generic-2.6/patches-2.6.32/260-crypto_optional_tests.patch new file mode 100644 index 0000000..0808c77 --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.32/260-crypto_optional_tests.patch @@ -0,0 +1,63 @@ +--- a/crypto/Kconfig ++++ b/crypto/Kconfig +@@ -96,6 +96,10 @@ config CRYPTO_MANAGER2 + select CRYPTO_BLKCIPHER2 + select CRYPTO_PCOMP + ++config CRYPTO_MANAGER_NO_TESTS ++ bool "Disable internal testsuite to save space" ++ depends on CRYPTO_MANAGER ++ + config CRYPTO_GF128MUL + tristate "GF(2^128) multiplication functions (EXPERIMENTAL)" + depends on EXPERIMENTAL +--- a/crypto/testmgr.c ++++ b/crypto/testmgr.c +@@ -47,6 +47,8 @@ + #define ENCRYPT 1 + #define DECRYPT 0 + ++#ifndef CONFIG_CRYPTO_MANAGER_NO_TESTS ++ + struct tcrypt_result { + struct completion completion; + int err; +@@ -2350,8 +2352,11 @@ static int alg_find_test(const char *alg + return -1; + } + ++#endif /* CONFIG_CRYPTO_MANAGER_NO_TESTS */ ++ + int alg_test(const char *driver, const char *alg, u32 type, u32 mask) + { ++#ifndef CONFIG_CRYPTO_MANAGER_NO_TESTS + int i; + int j; + int rc; +@@ -2406,5 +2411,8 @@ notest: + return 0; + non_fips_alg: + return -EINVAL; ++#else /* CONFIG_CRYPTO_MANAGER_NO_TESTS */ ++ return 0; ++#endif /* CONFIG_CRYPTO_MANAGER_NO_TESTS */ + } + EXPORT_SYMBOL_GPL(alg_test); +--- a/crypto/testmgr.h ++++ b/crypto/testmgr.h +@@ -20,6 +20,8 @@ + + #include <crypto/compress.h> + ++#ifndef CONFIG_CRYPTO_MANAGER_NO_TESTS ++ + #define MAX_DIGEST_SIZE 64 + #define MAX_TAP 8 + +@@ -9537,4 +9539,6 @@ static struct hash_testvec crc32c_tv_tem + }, + }; + ++#endif /* CONFIG_CRYPTO_MANAGER_NO_TESTS */ ++ + #endif /* _CRYPTO_TESTMGR_H */ |