summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-10-13 12:26:23 +0200
committerJohannes Berg <johannes.berg@intel.com>2017-10-13 15:29:52 +0200
commitdeaa397ea3d6c1ae5f7b6c089e8b805c02b293e5 (patch)
treeba6bc6e4439e1e8b40361d1c1e59dcb0e1579d8c /patches
parentb63923298a77174183a7abc9390bae5500703c05 (diff)
backports: remove CRYPTO_CCM backport
This never actually worked properly as far as I can tell, and now it looks like it won't even compile due to the real crypto_memneq() backport. Just remove it - distro kernels have it enabled and all others should just enable it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches')
-rw-r--r--patches/crypto-ccm.patch78
1 files changed, 0 insertions, 78 deletions
diff --git a/patches/crypto-ccm.patch b/patches/crypto-ccm.patch
deleted file mode 100644
index 2136689e..00000000
--- a/patches/crypto-ccm.patch
+++ /dev/null
@@ -1,78 +0,0 @@
---- a/compat/crypto-ccm.c
-+++ b/compat/crypto-ccm.c
-@@ -14,13 +14,44 @@
- #include <crypto/internal/hash.h>
- #include <crypto/internal/skcipher.h>
- #include <crypto/scatterwalk.h>
-+#include <crypto/algapi.h>
- #include <linux/err.h>
- #include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/slab.h>
-+#include <linux/version.h>
-
--#include "internal.h"
-+#if LINUX_VERSION_IS_LESS(3,13,0)
-+/* consider properly backporting this? */
-+static int crypto_memneq(const void *a, const void *b, size_t size)
-+{
-+ unsigned long neq = 0;
-+
-+#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
-+ while (size >= sizeof(unsigned long)) {
-+ neq |= *(unsigned long *)a ^ *(unsigned long *)b;
-+ /* OPTIMIZER_HIDE_VAR(neq); */
-+ barrier();
-+ a += sizeof(unsigned long);
-+ b += sizeof(unsigned long);
-+ size -= sizeof(unsigned long);
-+ }
-+#endif /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */
-+ while (size > 0) {
-+ neq |= *(unsigned char *)a ^ *(unsigned char *)b;
-+ /* OPTIMIZER_HIDE_VAR(neq); */
-+ barrier();
-+ a += 1;
-+ b += 1;
-+ size -= 1;
-+ }
-+ return neq != 0UL ? 1 : 0;
-+}
-+#endif
-+
-+/* from internal.h */
-+struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask);
-
- struct ccm_instance_ctx {
- struct crypto_skcipher_spawn ctr;
-@@ -1001,7 +1032,7 @@ static struct crypto_template crypto_cbc
- .module = THIS_MODULE,
- };
-
--static int __init crypto_ccm_module_init(void)
-+int __init crypto_ccm_module_init(void)
- {
- int err;
-
-@@ -1033,19 +1064,10 @@ out_undo_cbcmac:
- goto out;
- }
-
--static void __exit crypto_ccm_module_exit(void)
-+void __exit crypto_ccm_module_exit(void)
- {
- crypto_unregister_template(&crypto_rfc4309_tmpl);
- crypto_unregister_template(&crypto_ccm_tmpl);
- crypto_unregister_template(&crypto_ccm_base_tmpl);
- crypto_unregister_template(&crypto_cbcmac_tmpl);
- }
--
--module_init(crypto_ccm_module_init);
--module_exit(crypto_ccm_module_exit);
--
--MODULE_LICENSE("GPL");
--MODULE_DESCRIPTION("Counter with CBC MAC");
--MODULE_ALIAS_CRYPTO("ccm_base");
--MODULE_ALIAS_CRYPTO("rfc4309");
--MODULE_ALIAS_CRYPTO("ccm");