summaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-2.6.36/260-crypto_optional_tests.patch
diff options
context:
space:
mode:
authoracoul <acoul@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-08-29 14:35:23 +0000
committeracoul <acoul@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-08-29 14:35:23 +0000
commite60c0328f00278865338525f5ad9abeb0785ca5f (patch)
treef0db464d80e07fbb18c9f99ac73f45aadf7e22a6 /target/linux/generic/patches-2.6.36/260-crypto_optional_tests.patch
parentb0edeb40eabb575ec6a24fefcfcb61d71e13d3d2 (diff)
linux/generic: add kernel 2.6.36 preliminary support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22832 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-2.6.36/260-crypto_optional_tests.patch')
-rw-r--r--target/linux/generic/patches-2.6.36/260-crypto_optional_tests.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/target/linux/generic/patches-2.6.36/260-crypto_optional_tests.patch b/target/linux/generic/patches-2.6.36/260-crypto_optional_tests.patch
new file mode 100644
index 000000000..9273a0f55
--- /dev/null
+++ b/target/linux/generic/patches-2.6.36/260-crypto_optional_tests.patch
@@ -0,0 +1,64 @@
+--- a/crypto/Kconfig
++++ b/crypto/Kconfig
+@@ -104,6 +104,10 @@ config CRYPTO_MANAGER_TESTS
+ Run cryptomanager's tests for the new crypto algorithms being
+ registered.
+
++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
+@@ -58,6 +58,8 @@ int alg_test(const char *driver, const c
+ #define ENCRYPT 1
+ #define DECRYPT 0
+
++#ifndef CONFIG_CRYPTO_MANAGER_NO_TESTS
++
+ struct tcrypt_result {
+ struct completion completion;
+ int err;
+@@ -2484,8 +2486,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;
+@@ -2540,6 +2545,9 @@ notest:
+ return 0;
+ non_fips_alg:
+ return -EINVAL;
++#else /* CONFIG_CRYPTO_MANAGER_NO_TESTS */
++ return 0;
++#endif /* CONFIG_CRYPTO_MANAGER_NO_TESTS */
+ }
+
+ #endif /* CONFIG_CRYPTO_MANAGER_TESTS */
+--- 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
+
+@@ -9608,4 +9610,6 @@ static struct hash_testvec crc32c_tv_tem
+ },
+ };
+
++#endif /* CONFIG_CRYPTO_MANAGER_NO_TESTS */
++
+ #endif /* _CRYPTO_TESTMGR_H */