From deaa397ea3d6c1ae5f7b6c089e8b805c02b293e5 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 13 Oct 2017 12:26:23 +0200 Subject: 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 --- patches/crypto-ccm.patch | 78 ------------------------------------------------ 1 file changed, 78 deletions(-) delete mode 100644 patches/crypto-ccm.patch (limited to 'patches') 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 - #include - #include -+#include - #include - #include - #include - #include - #include -+#include - --#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"); -- cgit v1.2.3