Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2216571/?format=api
{ "id": 2216571, "url": "http://patchwork.ozlabs.org/api/patches/2216571/?format=api", "web_url": "http://patchwork.ozlabs.org/project/sparclinux/patch/20260326201246.57544-4-ebiggers@kernel.org/", "project": { "id": 10, "url": "http://patchwork.ozlabs.org/api/projects/10/?format=api", "name": "Linux SPARC Development ", "link_name": "sparclinux", "list_id": "sparclinux.vger.kernel.org", "list_email": "sparclinux@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260326201246.57544-4-ebiggers@kernel.org>", "list_archive_url": null, "date": "2026-03-26T20:12:45", "name": "[3/3] crypto: x86 - Remove des and des3_ede code", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ab9841592d085ce9e6ca9f8ec66d08ad4b54f8d4", "submitter": { "id": 74690, "url": "http://patchwork.ozlabs.org/api/people/74690/?format=api", "name": "Eric Biggers", "email": "ebiggers@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/sparclinux/patch/20260326201246.57544-4-ebiggers@kernel.org/mbox/", "series": [ { "id": 497643, "url": "http://patchwork.ozlabs.org/api/series/497643/?format=api", "web_url": "http://patchwork.ozlabs.org/project/sparclinux/list/?series=497643", "date": "2026-03-26T20:12:42", "name": "crypto: Remove arch-optimized des and des3_ede code", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497643/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2216571/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2216571/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=xA29=B2=vger.kernel.org=sparclinux+bounces-6568-patchwork-incoming=ozlabs.org@ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "sparclinux@vger.kernel.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "patchwork-incoming@ozlabs.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=p8pOSR48;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=150.107.74.76; helo=mail.ozlabs.org;\n envelope-from=srs0=xa29=b2=vger.kernel.org=sparclinux+bounces-6568-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)", "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.234.253.10 arc.chain=subspace.kernel.org", "gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org", "gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=p8pOSR48;\n\tdkim-atps=neutral", "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=sparclinux+bounces-6568-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"p8pOSR48\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "Received": [ "from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhZpQ5h9zz1yFp\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 07:18:06 +1100 (AEDT)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fhZpQ5D0Bz4w9r\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 07:18:06 +1100 (AEDT)", "by gandalf.ozlabs.org (Postfix)\n\tid 4fhZpQ57TJz4wM6; Fri, 27 Mar 2026 07:18:06 +1100 (AEDT)", "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby gandalf.ozlabs.org (Postfix) with ESMTPS id 4fhZpM1TnPz4w9r\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 27 Mar 2026 07:18:03 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id BFDE3308F46C\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 26 Mar 2026 20:12:57 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 170C73A6B9E;\n\tThu, 26 Mar 2026 20:12:55 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id DF1303A6B97;\n\tThu, 26 Mar 2026 20:12:54 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 74E96C2BC87;\n\tThu, 26 Mar 2026 20:12:54 +0000 (UTC)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1774556286; cv=pass;\n\tb=mHutvDPa5sDh7s9Kr5Ve0fOhurBdSEAaZkD+P0+U+M5kcNgP5Oww5UKXUNk31sXSE55QvpEXWBZ1nUs5LEi/gb2L3MkeyFyIMRTKtkR+Y2YD+kN89jTFqWYT/onR8eWZn/l3E3L1Bkx+c0Ua5Ulp9p14mRDfirn81Gjq31qDXVHz+K5TzBJtxzaQovCbUjbB2fdVq7i+qlIJbch/lF8Uvqqq46UXbVgDhgD2P/NuwTA7+vWoe0jyx1dkDGogk0lkMJz3EadwP+L+w5QZ6yhvEBtYoj0iaQN/NZipOmYD3H1oQDXW+O+cQzMo6cFY6FxTT5yACWJBR9hXeehray+1Nw==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774555975; cv=none;\n b=haXEWeMT1SwEpVQcI/VeHaOujh705zfVa0yRVQs+/k9aclVbmGryiBsO8LT7+XAvNJ6dS4AyfaUYRM7Qt5Or50w8rblpGxh4UFfCuDFar6bHsMabcw6miwRBrkrJIUCdWf8Q7MivODRBkqolyvmQOhdZnfnUJYSx9ksw4SRxXEI=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1774556286; c=relaxed/relaxed;\n\tbh=JCkuCX/2b+B0pllKh5JR7vKG8N8KsYzgMtR0CACVcfY=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=h0DnEarLX0hruysXcDNYDGh23E6eyMkhCQ6A0q46UkeWqetfkYY/x94u8VZahiMmg3vM0HTt+Y6q9c/UFcRftBDcp1UlDNFsdIK0+gOYfAE1yNA6WdiM0mRi47uKo6kgT5gmBFtpCjwBUSPEOXrAU/6+r6msSUdPWuj1792lUSPz+F8F6tHG49DyOIV60AcmH2N3WfCpVgU+79fHbORGKyZkxrSSY0teicXcKdCGY5U6am+vSt6NO1UOoAWHSi2cGH/MdsLyxJooTn4z6zrUjO5lKZ9AeOzJbVtM7dLZJ8VUcz98E17paMzRIpksyfvHrITa6OvKJRArRRuYdRV7Kw==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774555975; c=relaxed/simple;\n\tbh=HdokhCp0qf4fCEu1SzCv4Q5EVdAYGzwxQidjE5/B+MA=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=A0qY92Fix6YF497MnsqVAkZURTxEgL+Aa26lBSNvJGeTbzDNaMRLNzeSF01Kr/Y+PwnKTr5tU+Betg0D14EUumGVthiQrd/sqpSoFcJcQfp60rcf4B+ksdZUAvAYPhuzSv6YfeddXWmAeM2Ozjx5rzatOOAuPDWj7wKVAIs768g=" ], "ARC-Authentication-Results": [ "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=p8pOSR48; dkim-atps=neutral;\n spf=pass (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=sparclinux+bounces-6568-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org", "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=p8pOSR48; arc=none smtp.client-ip=10.30.226.201" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1774555974;\n\tbh=HdokhCp0qf4fCEu1SzCv4Q5EVdAYGzwxQidjE5/B+MA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=p8pOSR48P7xMnyYoJl+WJ0X4iI1qtYZIO1NFlZ4zEokXbeROShcWJ/lXFyDY5JaJG\n\t E7kaLmySgN4cC3vkdwDsh1emhQxMl93Wzp/O9CBd4eav3LIlVGWllhuEZdNj5yFpGS\n\t Bel4cDU46nmvuvjaXWFBo6mYepTvawnYWMD4bpi8HeWwqZveoYtabUBuxqUjiwoaXn\n\t yVpa2qA6d+mU0YOdUuJBv/aQS1O2T+rdQ/rKwycHxA1nd59qUL1IUahy2OwJw/om93\n\t B5W5MTXKJpr0MO6vPiCvCJDkRX9Ff/bIp9Bvv6bzeKlpBGl51GnC/3oMLwPg1v5KAV\n\t KdB7TJN9g8ykA==", "From": "Eric Biggers <ebiggers@kernel.org>", "To": "linux-crypto@vger.kernel.org,\n\tHerbert Xu <herbert@gondor.apana.org.au>", "Cc": "linux-kernel@vger.kernel.org,\n\tlinux-s390@vger.kernel.org,\n\tsparclinux@vger.kernel.org,\n\tx86@kernel.org,\n\tHarald Freudenberger <freude@linux.ibm.com>,\n\tHolger Dengler <dengler@linux.ibm.com>,\n\tEric Biggers <ebiggers@kernel.org>", "Subject": "[PATCH 3/3] crypto: x86 - Remove des and des3_ede code", "Date": "Thu, 26 Mar 2026 13:12:45 -0700", "Message-ID": "<20260326201246.57544-4-ebiggers@kernel.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260326201246.57544-1-ebiggers@kernel.org>", "References": "<20260326201246.57544-1-ebiggers@kernel.org>", "Precedence": "bulk", "X-Mailing-List": "sparclinux@vger.kernel.org", "List-Id": "<sparclinux.vger.kernel.org>", "List-Subscribe": "<mailto:sparclinux+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:sparclinux+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-Spam-Status": "No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tMAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org" }, "content": "Since DES and Triple DES are obsolete, there is very little point in\nmaintining architecture-optimized code for them. Remove it.\n\nSigned-off-by: Eric Biggers <ebiggers@kernel.org>\n---\n arch/x86/crypto/Kconfig | 14 -\n arch/x86/crypto/Makefile | 3 -\n arch/x86/crypto/des3_ede-asm_64.S | 831 ------------------------------\n arch/x86/crypto/des3_ede_glue.c | 391 --------------\n 4 files changed, 1239 deletions(-)\n delete mode 100644 arch/x86/crypto/des3_ede-asm_64.S\n delete mode 100644 arch/x86/crypto/des3_ede_glue.c", "diff": "diff --git a/arch/x86/crypto/Kconfig b/arch/x86/crypto/Kconfig\nindex 7fb2319a0916..03c5cdfe8eb0 100644\n--- a/arch/x86/crypto/Kconfig\n+++ b/arch/x86/crypto/Kconfig\n@@ -97,24 +97,10 @@ config CRYPTO_CAST6_AVX_X86_64\n \t Architecture: x86_64 using:\n \t - AVX (Advanced Vector Extensions)\n \n \t Processes eight blocks in parallel.\n \n-config CRYPTO_DES3_EDE_X86_64\n-\ttristate \"Ciphers: Triple DES EDE with modes: ECB, CBC\"\n-\tdepends on 64BIT\n-\tselect CRYPTO_SKCIPHER\n-\tselect CRYPTO_LIB_DES\n-\timply CRYPTO_CTR\n-\thelp\n-\t Block cipher: Triple DES EDE (FIPS 46-3) cipher algorithm\n-\t Length-preserving ciphers: Triple DES EDE with ECB and CBC modes\n-\n-\t Architecture: x86_64\n-\n-\t Processes one or three blocks in parallel.\n-\n config CRYPTO_SERPENT_SSE2_X86_64\n \ttristate \"Ciphers: Serpent with modes: ECB, CBC (SSE2)\"\n \tdepends on 64BIT\n \tselect CRYPTO_SKCIPHER\n \tselect CRYPTO_SERPENT\ndiff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile\nindex b21ad0978c52..cb07260f7f4f 100644\n--- a/arch/x86/crypto/Makefile\n+++ b/arch/x86/crypto/Makefile\n@@ -18,13 +18,10 @@ serpent-sse2-x86_64-y := serpent-sse2-x86_64-asm_64.o serpent_sse2_glue.o\n obj-$(CONFIG_CRYPTO_SERPENT_AVX_X86_64) += serpent-avx-x86_64.o\n serpent-avx-x86_64-y := serpent-avx-x86_64-asm_64.o serpent_avx_glue.o\n obj-$(CONFIG_CRYPTO_SERPENT_AVX2_X86_64) += serpent-avx2.o\n serpent-avx2-y := serpent-avx2-asm_64.o serpent_avx2_glue.o\n \n-obj-$(CONFIG_CRYPTO_DES3_EDE_X86_64) += des3_ede-x86_64.o\n-des3_ede-x86_64-y := des3_ede-asm_64.o des3_ede_glue.o\n-\n obj-$(CONFIG_CRYPTO_CAMELLIA_X86_64) += camellia-x86_64.o\n camellia-x86_64-y := camellia-x86_64-asm_64.o camellia_glue.o\n obj-$(CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64) += camellia-aesni-avx-x86_64.o\n camellia-aesni-avx-x86_64-y := camellia-aesni-avx-asm_64.o camellia_aesni_avx_glue.o\n obj-$(CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64) += camellia-aesni-avx2.o\ndiff --git a/arch/x86/crypto/des3_ede-asm_64.S b/arch/x86/crypto/des3_ede-asm_64.S\ndeleted file mode 100644\nindex cf21b998e77c..000000000000\n--- a/arch/x86/crypto/des3_ede-asm_64.S\n+++ /dev/null\n@@ -1,831 +0,0 @@\n-/* SPDX-License-Identifier: GPL-2.0-or-later */\n-/*\n- * des3_ede-asm_64.S - x86-64 assembly implementation of 3DES cipher\n- *\n- * Copyright © 2014 Jussi Kivilinna <jussi.kivilinna@iki.fi>\n- */\n-\n-#include <linux/linkage.h>\n-\n-.file \"des3_ede-asm_64.S\"\n-.text\n-\n-#define s1 .L_s1\n-#define s2 ((s1) + (64*8))\n-#define s3 ((s2) + (64*8))\n-#define s4 ((s3) + (64*8))\n-#define s5 ((s4) + (64*8))\n-#define s6 ((s5) + (64*8))\n-#define s7 ((s6) + (64*8))\n-#define s8 ((s7) + (64*8))\n-\n-/* register macros */\n-#define CTX %rdi\n-\n-#define RL0 %r8\n-#define RL1 %r9\n-#define RL2 %r10\n-\n-#define RL0d %r8d\n-#define RL1d %r9d\n-#define RL2d %r10d\n-\n-#define RR0 %r11\n-#define RR1 %r12\n-#define RR2 %r13\n-\n-#define RR0d %r11d\n-#define RR1d %r12d\n-#define RR2d %r13d\n-\n-#define RW0 %rax\n-#define RW1 %rbx\n-#define RW2 %rcx\n-\n-#define RW0d %eax\n-#define RW1d %ebx\n-#define RW2d %ecx\n-\n-#define RW0bl %al\n-#define RW1bl %bl\n-#define RW2bl %cl\n-\n-#define RW0bh %ah\n-#define RW1bh %bh\n-#define RW2bh %ch\n-\n-#define RT0 %r15\n-#define RT1 %rsi\n-#define RT2 %r14\n-#define RT3 %rdx\n-\n-#define RT0d %r15d\n-#define RT1d %esi\n-#define RT2d %r14d\n-#define RT3d %edx\n-\n-/***********************************************************************\n- * 1-way 3DES\n- ***********************************************************************/\n-#define do_permutation(a, b, offset, mask) \\\n-\tmovl a, RT0d; \\\n-\tshrl $(offset), RT0d; \\\n-\txorl b, RT0d; \\\n-\tandl $(mask), RT0d; \\\n-\txorl RT0d, b; \\\n-\tshll $(offset), RT0d; \\\n-\txorl RT0d, a;\n-\n-#define expand_to_64bits(val, mask) \\\n-\tmovl val##d, RT0d; \\\n-\trorl $4, RT0d; \\\n-\tshlq $32, RT0; \\\n-\torq RT0, val; \\\n-\tandq mask, val;\n-\n-#define compress_to_64bits(val) \\\n-\tmovq val, RT0; \\\n-\tshrq $32, RT0; \\\n-\troll $4, RT0d; \\\n-\torl RT0d, val##d;\n-\n-#define initial_permutation(left, right) \\\n-\tdo_permutation(left##d, right##d, 4, 0x0f0f0f0f); \\\n-\tdo_permutation(left##d, right##d, 16, 0x0000ffff); \\\n-\tdo_permutation(right##d, left##d, 2, 0x33333333); \\\n-\tdo_permutation(right##d, left##d, 8, 0x00ff00ff); \\\n-\tmovabs $0x3f3f3f3f3f3f3f3f, RT3; \\\n-\tmovl left##d, RW0d; \\\n-\troll $1, right##d; \\\n-\txorl right##d, RW0d; \\\n-\tandl $0xaaaaaaaa, RW0d; \\\n-\txorl RW0d, left##d; \\\n-\txorl RW0d, right##d; \\\n-\troll $1, left##d; \\\n-\texpand_to_64bits(right, RT3); \\\n-\texpand_to_64bits(left, RT3);\n-\n-#define final_permutation(left, right) \\\n-\tcompress_to_64bits(right); \\\n-\tcompress_to_64bits(left); \\\n-\tmovl right##d, RW0d; \\\n-\trorl $1, left##d; \\\n-\txorl left##d, RW0d; \\\n-\tandl $0xaaaaaaaa, RW0d; \\\n-\txorl RW0d, right##d; \\\n-\txorl RW0d, left##d; \\\n-\trorl $1, right##d; \\\n-\tdo_permutation(right##d, left##d, 8, 0x00ff00ff); \\\n-\tdo_permutation(right##d, left##d, 2, 0x33333333); \\\n-\tdo_permutation(left##d, right##d, 16, 0x0000ffff); \\\n-\tdo_permutation(left##d, right##d, 4, 0x0f0f0f0f);\n-\n-#define round1(n, from, to, load_next_key) \\\n-\txorq from, RW0; \\\n-\t\\\n-\tmovzbl RW0bl, RT0d; \\\n-\tmovzbl RW0bh, RT1d; \\\n-\tshrq $16, RW0; \\\n-\tmovzbl RW0bl, RT2d; \\\n-\tmovzbl RW0bh, RT3d; \\\n-\tshrq $16, RW0; \\\n-\tleaq s8(%rip), RW1; \\\n-\tmovq (RW1, RT0, 8), RT0; \\\n-\tleaq s6(%rip), RW1; \\\n-\txorq (RW1, RT1, 8), to; \\\n-\tmovzbl RW0bl, RL1d; \\\n-\tmovzbl RW0bh, RT1d; \\\n-\tshrl $16, RW0d; \\\n-\tleaq s4(%rip), RW1; \\\n-\txorq (RW1, RT2, 8), RT0; \\\n-\tleaq s2(%rip), RW1; \\\n-\txorq (RW1, RT3, 8), to; \\\n-\tmovzbl RW0bl, RT2d; \\\n-\tmovzbl RW0bh, RT3d; \\\n-\tleaq s7(%rip), RW1; \\\n-\txorq (RW1, RL1, 8), RT0; \\\n-\tleaq s5(%rip), RW1; \\\n-\txorq (RW1, RT1, 8), to; \\\n-\tleaq s3(%rip), RW1; \\\n-\txorq (RW1, RT2, 8), RT0; \\\n-\tload_next_key(n, RW0); \\\n-\txorq RT0, to; \\\n-\tleaq s1(%rip), RW1; \\\n-\txorq (RW1, RT3, 8), to; \\\n-\n-#define load_next_key(n, RWx) \\\n-\tmovq (((n) + 1) * 8)(CTX), RWx;\n-\n-#define dummy2(a, b) /*_*/\n-\n-#define read_block(io, left, right) \\\n-\tmovl (io), left##d; \\\n-\tmovl 4(io), right##d; \\\n-\tbswapl left##d; \\\n-\tbswapl right##d;\n-\n-#define write_block(io, left, right) \\\n-\tbswapl left##d; \\\n-\tbswapl right##d; \\\n-\tmovl left##d, (io); \\\n-\tmovl right##d, 4(io);\n-\n-SYM_FUNC_START(des3_ede_x86_64_crypt_blk)\n-\t/* input:\n-\t *\t%rdi: round keys, CTX\n-\t *\t%rsi: dst\n-\t *\t%rdx: src\n-\t */\n-\tpushq %rbx;\n-\tpushq %r12;\n-\tpushq %r13;\n-\tpushq %r14;\n-\tpushq %r15;\n-\n-\tpushq %rsi; /* dst */\n-\n-\tread_block(%rdx, RL0, RR0);\n-\tinitial_permutation(RL0, RR0);\n-\n-\tmovq (CTX), RW0;\n-\n-\tround1(0, RR0, RL0, load_next_key);\n-\tround1(1, RL0, RR0, load_next_key);\n-\tround1(2, RR0, RL0, load_next_key);\n-\tround1(3, RL0, RR0, load_next_key);\n-\tround1(4, RR0, RL0, load_next_key);\n-\tround1(5, RL0, RR0, load_next_key);\n-\tround1(6, RR0, RL0, load_next_key);\n-\tround1(7, RL0, RR0, load_next_key);\n-\tround1(8, RR0, RL0, load_next_key);\n-\tround1(9, RL0, RR0, load_next_key);\n-\tround1(10, RR0, RL0, load_next_key);\n-\tround1(11, RL0, RR0, load_next_key);\n-\tround1(12, RR0, RL0, load_next_key);\n-\tround1(13, RL0, RR0, load_next_key);\n-\tround1(14, RR0, RL0, load_next_key);\n-\tround1(15, RL0, RR0, load_next_key);\n-\n-\tround1(16+0, RL0, RR0, load_next_key);\n-\tround1(16+1, RR0, RL0, load_next_key);\n-\tround1(16+2, RL0, RR0, load_next_key);\n-\tround1(16+3, RR0, RL0, load_next_key);\n-\tround1(16+4, RL0, RR0, load_next_key);\n-\tround1(16+5, RR0, RL0, load_next_key);\n-\tround1(16+6, RL0, RR0, load_next_key);\n-\tround1(16+7, RR0, RL0, load_next_key);\n-\tround1(16+8, RL0, RR0, load_next_key);\n-\tround1(16+9, RR0, RL0, load_next_key);\n-\tround1(16+10, RL0, RR0, load_next_key);\n-\tround1(16+11, RR0, RL0, load_next_key);\n-\tround1(16+12, RL0, RR0, load_next_key);\n-\tround1(16+13, RR0, RL0, load_next_key);\n-\tround1(16+14, RL0, RR0, load_next_key);\n-\tround1(16+15, RR0, RL0, load_next_key);\n-\n-\tround1(32+0, RR0, RL0, load_next_key);\n-\tround1(32+1, RL0, RR0, load_next_key);\n-\tround1(32+2, RR0, RL0, load_next_key);\n-\tround1(32+3, RL0, RR0, load_next_key);\n-\tround1(32+4, RR0, RL0, load_next_key);\n-\tround1(32+5, RL0, RR0, load_next_key);\n-\tround1(32+6, RR0, RL0, load_next_key);\n-\tround1(32+7, RL0, RR0, load_next_key);\n-\tround1(32+8, RR0, RL0, load_next_key);\n-\tround1(32+9, RL0, RR0, load_next_key);\n-\tround1(32+10, RR0, RL0, load_next_key);\n-\tround1(32+11, RL0, RR0, load_next_key);\n-\tround1(32+12, RR0, RL0, load_next_key);\n-\tround1(32+13, RL0, RR0, load_next_key);\n-\tround1(32+14, RR0, RL0, load_next_key);\n-\tround1(32+15, RL0, RR0, dummy2);\n-\n-\tfinal_permutation(RR0, RL0);\n-\n-\tpopq %rsi /* dst */\n-\twrite_block(%rsi, RR0, RL0);\n-\n-\tpopq %r15;\n-\tpopq %r14;\n-\tpopq %r13;\n-\tpopq %r12;\n-\tpopq %rbx;\n-\n-\tRET;\n-SYM_FUNC_END(des3_ede_x86_64_crypt_blk)\n-\n-/***********************************************************************\n- * 3-way 3DES\n- ***********************************************************************/\n-#define expand_to_64bits(val, mask) \\\n-\tmovl val##d, RT0d; \\\n-\trorl $4, RT0d; \\\n-\tshlq $32, RT0; \\\n-\torq RT0, val; \\\n-\tandq mask, val;\n-\n-#define compress_to_64bits(val) \\\n-\tmovq val, RT0; \\\n-\tshrq $32, RT0; \\\n-\troll $4, RT0d; \\\n-\torl RT0d, val##d;\n-\n-#define initial_permutation3(left, right) \\\n-\tdo_permutation(left##0d, right##0d, 4, 0x0f0f0f0f); \\\n-\tdo_permutation(left##0d, right##0d, 16, 0x0000ffff); \\\n-\t do_permutation(left##1d, right##1d, 4, 0x0f0f0f0f); \\\n-\t do_permutation(left##1d, right##1d, 16, 0x0000ffff); \\\n-\t do_permutation(left##2d, right##2d, 4, 0x0f0f0f0f); \\\n-\t do_permutation(left##2d, right##2d, 16, 0x0000ffff); \\\n-\t \\\n-\tdo_permutation(right##0d, left##0d, 2, 0x33333333); \\\n-\tdo_permutation(right##0d, left##0d, 8, 0x00ff00ff); \\\n-\t do_permutation(right##1d, left##1d, 2, 0x33333333); \\\n-\t do_permutation(right##1d, left##1d, 8, 0x00ff00ff); \\\n-\t do_permutation(right##2d, left##2d, 2, 0x33333333); \\\n-\t do_permutation(right##2d, left##2d, 8, 0x00ff00ff); \\\n-\t \\\n-\tmovabs $0x3f3f3f3f3f3f3f3f, RT3; \\\n-\t \\\n-\tmovl left##0d, RW0d; \\\n-\troll $1, right##0d; \\\n-\txorl right##0d, RW0d; \\\n-\tandl $0xaaaaaaaa, RW0d; \\\n-\txorl RW0d, left##0d; \\\n-\txorl RW0d, right##0d; \\\n-\troll $1, left##0d; \\\n-\texpand_to_64bits(right##0, RT3); \\\n-\texpand_to_64bits(left##0, RT3); \\\n-\t movl left##1d, RW1d; \\\n-\t roll $1, right##1d; \\\n-\t xorl right##1d, RW1d; \\\n-\t andl $0xaaaaaaaa, RW1d; \\\n-\t xorl RW1d, left##1d; \\\n-\t xorl RW1d, right##1d; \\\n-\t roll $1, left##1d; \\\n-\t expand_to_64bits(right##1, RT3); \\\n-\t expand_to_64bits(left##1, RT3); \\\n-\t movl left##2d, RW2d; \\\n-\t roll $1, right##2d; \\\n-\t xorl right##2d, RW2d; \\\n-\t andl $0xaaaaaaaa, RW2d; \\\n-\t xorl RW2d, left##2d; \\\n-\t xorl RW2d, right##2d; \\\n-\t roll $1, left##2d; \\\n-\t expand_to_64bits(right##2, RT3); \\\n-\t expand_to_64bits(left##2, RT3);\n-\n-#define final_permutation3(left, right) \\\n-\tcompress_to_64bits(right##0); \\\n-\tcompress_to_64bits(left##0); \\\n-\tmovl right##0d, RW0d; \\\n-\trorl $1, left##0d; \\\n-\txorl left##0d, RW0d; \\\n-\tandl $0xaaaaaaaa, RW0d; \\\n-\txorl RW0d, right##0d; \\\n-\txorl RW0d, left##0d; \\\n-\trorl $1, right##0d; \\\n-\t compress_to_64bits(right##1); \\\n-\t compress_to_64bits(left##1); \\\n-\t movl right##1d, RW1d; \\\n-\t rorl $1, left##1d; \\\n-\t xorl left##1d, RW1d; \\\n-\t andl $0xaaaaaaaa, RW1d; \\\n-\t xorl RW1d, right##1d; \\\n-\t xorl RW1d, left##1d; \\\n-\t rorl $1, right##1d; \\\n-\t compress_to_64bits(right##2); \\\n-\t compress_to_64bits(left##2); \\\n-\t movl right##2d, RW2d; \\\n-\t rorl $1, left##2d; \\\n-\t xorl left##2d, RW2d; \\\n-\t andl $0xaaaaaaaa, RW2d; \\\n-\t xorl RW2d, right##2d; \\\n-\t xorl RW2d, left##2d; \\\n-\t rorl $1, right##2d; \\\n-\t \\\n-\tdo_permutation(right##0d, left##0d, 8, 0x00ff00ff); \\\n-\tdo_permutation(right##0d, left##0d, 2, 0x33333333); \\\n-\t do_permutation(right##1d, left##1d, 8, 0x00ff00ff); \\\n-\t do_permutation(right##1d, left##1d, 2, 0x33333333); \\\n-\t do_permutation(right##2d, left##2d, 8, 0x00ff00ff); \\\n-\t do_permutation(right##2d, left##2d, 2, 0x33333333); \\\n-\t \\\n-\tdo_permutation(left##0d, right##0d, 16, 0x0000ffff); \\\n-\tdo_permutation(left##0d, right##0d, 4, 0x0f0f0f0f); \\\n-\t do_permutation(left##1d, right##1d, 16, 0x0000ffff); \\\n-\t do_permutation(left##1d, right##1d, 4, 0x0f0f0f0f); \\\n-\t do_permutation(left##2d, right##2d, 16, 0x0000ffff); \\\n-\t do_permutation(left##2d, right##2d, 4, 0x0f0f0f0f);\n-\n-#define round3(n, from, to, load_next_key, do_movq) \\\n-\txorq from##0, RW0; \\\n-\tmovzbl RW0bl, RT3d; \\\n-\tmovzbl RW0bh, RT1d; \\\n-\tshrq $16, RW0; \\\n-\tleaq s8(%rip), RT2; \\\n-\txorq (RT2, RT3, 8), to##0; \\\n-\tleaq s6(%rip), RT2; \\\n-\txorq (RT2, RT1, 8), to##0; \\\n-\tmovzbl RW0bl, RT3d; \\\n-\tmovzbl RW0bh, RT1d; \\\n-\tshrq $16, RW0; \\\n-\tleaq s4(%rip), RT2; \\\n-\txorq (RT2, RT3, 8), to##0; \\\n-\tleaq s2(%rip), RT2; \\\n-\txorq (RT2, RT1, 8), to##0; \\\n-\tmovzbl RW0bl, RT3d; \\\n-\tmovzbl RW0bh, RT1d; \\\n-\tshrl $16, RW0d; \\\n-\tleaq s7(%rip), RT2; \\\n-\txorq (RT2, RT3, 8), to##0; \\\n-\tleaq s5(%rip), RT2; \\\n-\txorq (RT2, RT1, 8), to##0; \\\n-\tmovzbl RW0bl, RT3d; \\\n-\tmovzbl RW0bh, RT1d; \\\n-\tload_next_key(n, RW0); \\\n-\tleaq s3(%rip), RT2; \\\n-\txorq (RT2, RT3, 8), to##0; \\\n-\tleaq s1(%rip), RT2; \\\n-\txorq (RT2, RT1, 8), to##0; \\\n-\t\txorq from##1, RW1; \\\n-\t\tmovzbl RW1bl, RT3d; \\\n-\t\tmovzbl RW1bh, RT1d; \\\n-\t\tshrq $16, RW1; \\\n-\t\tleaq s8(%rip), RT2; \\\n-\t\txorq (RT2, RT3, 8), to##1; \\\n-\t\tleaq s6(%rip), RT2; \\\n-\t\txorq (RT2, RT1, 8), to##1; \\\n-\t\tmovzbl RW1bl, RT3d; \\\n-\t\tmovzbl RW1bh, RT1d; \\\n-\t\tshrq $16, RW1; \\\n-\t\tleaq s4(%rip), RT2; \\\n-\t\txorq (RT2, RT3, 8), to##1; \\\n-\t\tleaq s2(%rip), RT2; \\\n-\t\txorq (RT2, RT1, 8), to##1; \\\n-\t\tmovzbl RW1bl, RT3d; \\\n-\t\tmovzbl RW1bh, RT1d; \\\n-\t\tshrl $16, RW1d; \\\n-\t\tleaq s7(%rip), RT2; \\\n-\t\txorq (RT2, RT3, 8), to##1; \\\n-\t\tleaq s5(%rip), RT2; \\\n-\t\txorq (RT2, RT1, 8), to##1; \\\n-\t\tmovzbl RW1bl, RT3d; \\\n-\t\tmovzbl RW1bh, RT1d; \\\n-\t\tdo_movq(RW0, RW1); \\\n-\t\tleaq s3(%rip), RT2; \\\n-\t\txorq (RT2, RT3, 8), to##1; \\\n-\t\tleaq s1(%rip), RT2; \\\n-\t\txorq (RT2, RT1, 8), to##1; \\\n-\t\t\txorq from##2, RW2; \\\n-\t\t\tmovzbl RW2bl, RT3d; \\\n-\t\t\tmovzbl RW2bh, RT1d; \\\n-\t\t\tshrq $16, RW2; \\\n-\t\t\tleaq s8(%rip), RT2; \\\n-\t\t\txorq (RT2, RT3, 8), to##2; \\\n-\t\t\tleaq s6(%rip), RT2; \\\n-\t\t\txorq (RT2, RT1, 8), to##2; \\\n-\t\t\tmovzbl RW2bl, RT3d; \\\n-\t\t\tmovzbl RW2bh, RT1d; \\\n-\t\t\tshrq $16, RW2; \\\n-\t\t\tleaq s4(%rip), RT2; \\\n-\t\t\txorq (RT2, RT3, 8), to##2; \\\n-\t\t\tleaq s2(%rip), RT2; \\\n-\t\t\txorq (RT2, RT1, 8), to##2; \\\n-\t\t\tmovzbl RW2bl, RT3d; \\\n-\t\t\tmovzbl RW2bh, RT1d; \\\n-\t\t\tshrl $16, RW2d; \\\n-\t\t\tleaq s7(%rip), RT2; \\\n-\t\t\txorq (RT2, RT3, 8), to##2; \\\n-\t\t\tleaq s5(%rip), RT2; \\\n-\t\t\txorq (RT2, RT1, 8), to##2; \\\n-\t\t\tmovzbl RW2bl, RT3d; \\\n-\t\t\tmovzbl RW2bh, RT1d; \\\n-\t\t\tdo_movq(RW0, RW2); \\\n-\t\t\tleaq s3(%rip), RT2; \\\n-\t\t\txorq (RT2, RT3, 8), to##2; \\\n-\t\t\tleaq s1(%rip), RT2; \\\n-\t\t\txorq (RT2, RT1, 8), to##2;\n-\n-#define __movq(src, dst) \\\n-\tmovq src, dst;\n-\n-SYM_FUNC_START(des3_ede_x86_64_crypt_blk_3way)\n-\t/* input:\n-\t *\t%rdi: ctx, round keys\n-\t *\t%rsi: dst (3 blocks)\n-\t *\t%rdx: src (3 blocks)\n-\t */\n-\n-\tpushq %rbx;\n-\tpushq %r12;\n-\tpushq %r13;\n-\tpushq %r14;\n-\tpushq %r15;\n-\n-\tpushq %rsi /* dst */\n-\n-\t/* load input */\n-\tmovl 0 * 4(%rdx), RL0d;\n-\tmovl 1 * 4(%rdx), RR0d;\n-\tmovl 2 * 4(%rdx), RL1d;\n-\tmovl 3 * 4(%rdx), RR1d;\n-\tmovl 4 * 4(%rdx), RL2d;\n-\tmovl 5 * 4(%rdx), RR2d;\n-\n-\tbswapl RL0d;\n-\tbswapl RR0d;\n-\tbswapl RL1d;\n-\tbswapl RR1d;\n-\tbswapl RL2d;\n-\tbswapl RR2d;\n-\n-\tinitial_permutation3(RL, RR);\n-\n-\tmovq 0(CTX), RW0;\n-\tmovq RW0, RW1;\n-\tmovq RW0, RW2;\n-\n-\tround3(0, RR, RL, load_next_key, __movq);\n-\tround3(1, RL, RR, load_next_key, __movq);\n-\tround3(2, RR, RL, load_next_key, __movq);\n-\tround3(3, RL, RR, load_next_key, __movq);\n-\tround3(4, RR, RL, load_next_key, __movq);\n-\tround3(5, RL, RR, load_next_key, __movq);\n-\tround3(6, RR, RL, load_next_key, __movq);\n-\tround3(7, RL, RR, load_next_key, __movq);\n-\tround3(8, RR, RL, load_next_key, __movq);\n-\tround3(9, RL, RR, load_next_key, __movq);\n-\tround3(10, RR, RL, load_next_key, __movq);\n-\tround3(11, RL, RR, load_next_key, __movq);\n-\tround3(12, RR, RL, load_next_key, __movq);\n-\tround3(13, RL, RR, load_next_key, __movq);\n-\tround3(14, RR, RL, load_next_key, __movq);\n-\tround3(15, RL, RR, load_next_key, __movq);\n-\n-\tround3(16+0, RL, RR, load_next_key, __movq);\n-\tround3(16+1, RR, RL, load_next_key, __movq);\n-\tround3(16+2, RL, RR, load_next_key, __movq);\n-\tround3(16+3, RR, RL, load_next_key, __movq);\n-\tround3(16+4, RL, RR, load_next_key, __movq);\n-\tround3(16+5, RR, RL, load_next_key, __movq);\n-\tround3(16+6, RL, RR, load_next_key, __movq);\n-\tround3(16+7, RR, RL, load_next_key, __movq);\n-\tround3(16+8, RL, RR, load_next_key, __movq);\n-\tround3(16+9, RR, RL, load_next_key, __movq);\n-\tround3(16+10, RL, RR, load_next_key, __movq);\n-\tround3(16+11, RR, RL, load_next_key, __movq);\n-\tround3(16+12, RL, RR, load_next_key, __movq);\n-\tround3(16+13, RR, RL, load_next_key, __movq);\n-\tround3(16+14, RL, RR, load_next_key, __movq);\n-\tround3(16+15, RR, RL, load_next_key, __movq);\n-\n-\tround3(32+0, RR, RL, load_next_key, __movq);\n-\tround3(32+1, RL, RR, load_next_key, __movq);\n-\tround3(32+2, RR, RL, load_next_key, __movq);\n-\tround3(32+3, RL, RR, load_next_key, __movq);\n-\tround3(32+4, RR, RL, load_next_key, __movq);\n-\tround3(32+5, RL, RR, load_next_key, __movq);\n-\tround3(32+6, RR, RL, load_next_key, __movq);\n-\tround3(32+7, RL, RR, load_next_key, __movq);\n-\tround3(32+8, RR, RL, load_next_key, __movq);\n-\tround3(32+9, RL, RR, load_next_key, __movq);\n-\tround3(32+10, RR, RL, load_next_key, __movq);\n-\tround3(32+11, RL, RR, load_next_key, __movq);\n-\tround3(32+12, RR, RL, load_next_key, __movq);\n-\tround3(32+13, RL, RR, load_next_key, __movq);\n-\tround3(32+14, RR, RL, load_next_key, __movq);\n-\tround3(32+15, RL, RR, dummy2, dummy2);\n-\n-\tfinal_permutation3(RR, RL);\n-\n-\tbswapl RR0d;\n-\tbswapl RL0d;\n-\tbswapl RR1d;\n-\tbswapl RL1d;\n-\tbswapl RR2d;\n-\tbswapl RL2d;\n-\n-\tpopq %rsi /* dst */\n-\tmovl RR0d, 0 * 4(%rsi);\n-\tmovl RL0d, 1 * 4(%rsi);\n-\tmovl RR1d, 2 * 4(%rsi);\n-\tmovl RL1d, 3 * 4(%rsi);\n-\tmovl RR2d, 4 * 4(%rsi);\n-\tmovl RL2d, 5 * 4(%rsi);\n-\n-\tpopq %r15;\n-\tpopq %r14;\n-\tpopq %r13;\n-\tpopq %r12;\n-\tpopq %rbx;\n-\n-\tRET;\n-SYM_FUNC_END(des3_ede_x86_64_crypt_blk_3way)\n-\n-.section\t.rodata, \"a\", @progbits\n-.align 16\n-.L_s1:\n-\t.quad 0x0010100001010400, 0x0000000000000000\n-\t.quad 0x0000100000010000, 0x0010100001010404\n-\t.quad 0x0010100001010004, 0x0000100000010404\n-\t.quad 0x0000000000000004, 0x0000100000010000\n-\t.quad 0x0000000000000400, 0x0010100001010400\n-\t.quad 0x0010100001010404, 0x0000000000000400\n-\t.quad 0x0010000001000404, 0x0010100001010004\n-\t.quad 0x0010000001000000, 0x0000000000000004\n-\t.quad 0x0000000000000404, 0x0010000001000400\n-\t.quad 0x0010000001000400, 0x0000100000010400\n-\t.quad 0x0000100000010400, 0x0010100001010000\n-\t.quad 0x0010100001010000, 0x0010000001000404\n-\t.quad 0x0000100000010004, 0x0010000001000004\n-\t.quad 0x0010000001000004, 0x0000100000010004\n-\t.quad 0x0000000000000000, 0x0000000000000404\n-\t.quad 0x0000100000010404, 0x0010000001000000\n-\t.quad 0x0000100000010000, 0x0010100001010404\n-\t.quad 0x0000000000000004, 0x0010100001010000\n-\t.quad 0x0010100001010400, 0x0010000001000000\n-\t.quad 0x0010000001000000, 0x0000000000000400\n-\t.quad 0x0010100001010004, 0x0000100000010000\n-\t.quad 0x0000100000010400, 0x0010000001000004\n-\t.quad 0x0000000000000400, 0x0000000000000004\n-\t.quad 0x0010000001000404, 0x0000100000010404\n-\t.quad 0x0010100001010404, 0x0000100000010004\n-\t.quad 0x0010100001010000, 0x0010000001000404\n-\t.quad 0x0010000001000004, 0x0000000000000404\n-\t.quad 0x0000100000010404, 0x0010100001010400\n-\t.quad 0x0000000000000404, 0x0010000001000400\n-\t.quad 0x0010000001000400, 0x0000000000000000\n-\t.quad 0x0000100000010004, 0x0000100000010400\n-\t.quad 0x0000000000000000, 0x0010100001010004\n-.L_s2:\n-\t.quad 0x0801080200100020, 0x0800080000000000\n-\t.quad 0x0000080000000000, 0x0001080200100020\n-\t.quad 0x0001000000100000, 0x0000000200000020\n-\t.quad 0x0801000200100020, 0x0800080200000020\n-\t.quad 0x0800000200000020, 0x0801080200100020\n-\t.quad 0x0801080000100000, 0x0800000000000000\n-\t.quad 0x0800080000000000, 0x0001000000100000\n-\t.quad 0x0000000200000020, 0x0801000200100020\n-\t.quad 0x0001080000100000, 0x0001000200100020\n-\t.quad 0x0800080200000020, 0x0000000000000000\n-\t.quad 0x0800000000000000, 0x0000080000000000\n-\t.quad 0x0001080200100020, 0x0801000000100000\n-\t.quad 0x0001000200100020, 0x0800000200000020\n-\t.quad 0x0000000000000000, 0x0001080000100000\n-\t.quad 0x0000080200000020, 0x0801080000100000\n-\t.quad 0x0801000000100000, 0x0000080200000020\n-\t.quad 0x0000000000000000, 0x0001080200100020\n-\t.quad 0x0801000200100020, 0x0001000000100000\n-\t.quad 0x0800080200000020, 0x0801000000100000\n-\t.quad 0x0801080000100000, 0x0000080000000000\n-\t.quad 0x0801000000100000, 0x0800080000000000\n-\t.quad 0x0000000200000020, 0x0801080200100020\n-\t.quad 0x0001080200100020, 0x0000000200000020\n-\t.quad 0x0000080000000000, 0x0800000000000000\n-\t.quad 0x0000080200000020, 0x0801080000100000\n-\t.quad 0x0001000000100000, 0x0800000200000020\n-\t.quad 0x0001000200100020, 0x0800080200000020\n-\t.quad 0x0800000200000020, 0x0001000200100020\n-\t.quad 0x0001080000100000, 0x0000000000000000\n-\t.quad 0x0800080000000000, 0x0000080200000020\n-\t.quad 0x0800000000000000, 0x0801000200100020\n-\t.quad 0x0801080200100020, 0x0001080000100000\n-.L_s3:\n-\t.quad 0x0000002000000208, 0x0000202008020200\n-\t.quad 0x0000000000000000, 0x0000200008020008\n-\t.quad 0x0000002008000200, 0x0000000000000000\n-\t.quad 0x0000202000020208, 0x0000002008000200\n-\t.quad 0x0000200000020008, 0x0000000008000008\n-\t.quad 0x0000000008000008, 0x0000200000020000\n-\t.quad 0x0000202008020208, 0x0000200000020008\n-\t.quad 0x0000200008020000, 0x0000002000000208\n-\t.quad 0x0000000008000000, 0x0000000000000008\n-\t.quad 0x0000202008020200, 0x0000002000000200\n-\t.quad 0x0000202000020200, 0x0000200008020000\n-\t.quad 0x0000200008020008, 0x0000202000020208\n-\t.quad 0x0000002008000208, 0x0000202000020200\n-\t.quad 0x0000200000020000, 0x0000002008000208\n-\t.quad 0x0000000000000008, 0x0000202008020208\n-\t.quad 0x0000002000000200, 0x0000000008000000\n-\t.quad 0x0000202008020200, 0x0000000008000000\n-\t.quad 0x0000200000020008, 0x0000002000000208\n-\t.quad 0x0000200000020000, 0x0000202008020200\n-\t.quad 0x0000002008000200, 0x0000000000000000\n-\t.quad 0x0000002000000200, 0x0000200000020008\n-\t.quad 0x0000202008020208, 0x0000002008000200\n-\t.quad 0x0000000008000008, 0x0000002000000200\n-\t.quad 0x0000000000000000, 0x0000200008020008\n-\t.quad 0x0000002008000208, 0x0000200000020000\n-\t.quad 0x0000000008000000, 0x0000202008020208\n-\t.quad 0x0000000000000008, 0x0000202000020208\n-\t.quad 0x0000202000020200, 0x0000000008000008\n-\t.quad 0x0000200008020000, 0x0000002008000208\n-\t.quad 0x0000002000000208, 0x0000200008020000\n-\t.quad 0x0000202000020208, 0x0000000000000008\n-\t.quad 0x0000200008020008, 0x0000202000020200\n-.L_s4:\n-\t.quad 0x1008020000002001, 0x1000020800002001\n-\t.quad 0x1000020800002001, 0x0000000800000000\n-\t.quad 0x0008020800002000, 0x1008000800000001\n-\t.quad 0x1008000000000001, 0x1000020000002001\n-\t.quad 0x0000000000000000, 0x0008020000002000\n-\t.quad 0x0008020000002000, 0x1008020800002001\n-\t.quad 0x1000000800000001, 0x0000000000000000\n-\t.quad 0x0008000800000000, 0x1008000000000001\n-\t.quad 0x1000000000000001, 0x0000020000002000\n-\t.quad 0x0008000000000000, 0x1008020000002001\n-\t.quad 0x0000000800000000, 0x0008000000000000\n-\t.quad 0x1000020000002001, 0x0000020800002000\n-\t.quad 0x1008000800000001, 0x1000000000000001\n-\t.quad 0x0000020800002000, 0x0008000800000000\n-\t.quad 0x0000020000002000, 0x0008020800002000\n-\t.quad 0x1008020800002001, 0x1000000800000001\n-\t.quad 0x0008000800000000, 0x1008000000000001\n-\t.quad 0x0008020000002000, 0x1008020800002001\n-\t.quad 0x1000000800000001, 0x0000000000000000\n-\t.quad 0x0000000000000000, 0x0008020000002000\n-\t.quad 0x0000020800002000, 0x0008000800000000\n-\t.quad 0x1008000800000001, 0x1000000000000001\n-\t.quad 0x1008020000002001, 0x1000020800002001\n-\t.quad 0x1000020800002001, 0x0000000800000000\n-\t.quad 0x1008020800002001, 0x1000000800000001\n-\t.quad 0x1000000000000001, 0x0000020000002000\n-\t.quad 0x1008000000000001, 0x1000020000002001\n-\t.quad 0x0008020800002000, 0x1008000800000001\n-\t.quad 0x1000020000002001, 0x0000020800002000\n-\t.quad 0x0008000000000000, 0x1008020000002001\n-\t.quad 0x0000000800000000, 0x0008000000000000\n-\t.quad 0x0000020000002000, 0x0008020800002000\n-.L_s5:\n-\t.quad 0x0000001000000100, 0x0020001002080100\n-\t.quad 0x0020000002080000, 0x0420001002000100\n-\t.quad 0x0000000000080000, 0x0000001000000100\n-\t.quad 0x0400000000000000, 0x0020000002080000\n-\t.quad 0x0400001000080100, 0x0000000000080000\n-\t.quad 0x0020001002000100, 0x0400001000080100\n-\t.quad 0x0420001002000100, 0x0420000002080000\n-\t.quad 0x0000001000080100, 0x0400000000000000\n-\t.quad 0x0020000002000000, 0x0400000000080000\n-\t.quad 0x0400000000080000, 0x0000000000000000\n-\t.quad 0x0400001000000100, 0x0420001002080100\n-\t.quad 0x0420001002080100, 0x0020001002000100\n-\t.quad 0x0420000002080000, 0x0400001000000100\n-\t.quad 0x0000000000000000, 0x0420000002000000\n-\t.quad 0x0020001002080100, 0x0020000002000000\n-\t.quad 0x0420000002000000, 0x0000001000080100\n-\t.quad 0x0000000000080000, 0x0420001002000100\n-\t.quad 0x0000001000000100, 0x0020000002000000\n-\t.quad 0x0400000000000000, 0x0020000002080000\n-\t.quad 0x0420001002000100, 0x0400001000080100\n-\t.quad 0x0020001002000100, 0x0400000000000000\n-\t.quad 0x0420000002080000, 0x0020001002080100\n-\t.quad 0x0400001000080100, 0x0000001000000100\n-\t.quad 0x0020000002000000, 0x0420000002080000\n-\t.quad 0x0420001002080100, 0x0000001000080100\n-\t.quad 0x0420000002000000, 0x0420001002080100\n-\t.quad 0x0020000002080000, 0x0000000000000000\n-\t.quad 0x0400000000080000, 0x0420000002000000\n-\t.quad 0x0000001000080100, 0x0020001002000100\n-\t.quad 0x0400001000000100, 0x0000000000080000\n-\t.quad 0x0000000000000000, 0x0400000000080000\n-\t.quad 0x0020001002080100, 0x0400001000000100\n-.L_s6:\n-\t.quad 0x0200000120000010, 0x0204000020000000\n-\t.quad 0x0000040000000000, 0x0204040120000010\n-\t.quad 0x0204000020000000, 0x0000000100000010\n-\t.quad 0x0204040120000010, 0x0004000000000000\n-\t.quad 0x0200040020000000, 0x0004040100000010\n-\t.quad 0x0004000000000000, 0x0200000120000010\n-\t.quad 0x0004000100000010, 0x0200040020000000\n-\t.quad 0x0200000020000000, 0x0000040100000010\n-\t.quad 0x0000000000000000, 0x0004000100000010\n-\t.quad 0x0200040120000010, 0x0000040000000000\n-\t.quad 0x0004040000000000, 0x0200040120000010\n-\t.quad 0x0000000100000010, 0x0204000120000010\n-\t.quad 0x0204000120000010, 0x0000000000000000\n-\t.quad 0x0004040100000010, 0x0204040020000000\n-\t.quad 0x0000040100000010, 0x0004040000000000\n-\t.quad 0x0204040020000000, 0x0200000020000000\n-\t.quad 0x0200040020000000, 0x0000000100000010\n-\t.quad 0x0204000120000010, 0x0004040000000000\n-\t.quad 0x0204040120000010, 0x0004000000000000\n-\t.quad 0x0000040100000010, 0x0200000120000010\n-\t.quad 0x0004000000000000, 0x0200040020000000\n-\t.quad 0x0200000020000000, 0x0000040100000010\n-\t.quad 0x0200000120000010, 0x0204040120000010\n-\t.quad 0x0004040000000000, 0x0204000020000000\n-\t.quad 0x0004040100000010, 0x0204040020000000\n-\t.quad 0x0000000000000000, 0x0204000120000010\n-\t.quad 0x0000000100000010, 0x0000040000000000\n-\t.quad 0x0204000020000000, 0x0004040100000010\n-\t.quad 0x0000040000000000, 0x0004000100000010\n-\t.quad 0x0200040120000010, 0x0000000000000000\n-\t.quad 0x0204040020000000, 0x0200000020000000\n-\t.quad 0x0004000100000010, 0x0200040120000010\n-.L_s7:\n-\t.quad 0x0002000000200000, 0x2002000004200002\n-\t.quad 0x2000000004000802, 0x0000000000000000\n-\t.quad 0x0000000000000800, 0x2000000004000802\n-\t.quad 0x2002000000200802, 0x0002000004200800\n-\t.quad 0x2002000004200802, 0x0002000000200000\n-\t.quad 0x0000000000000000, 0x2000000004000002\n-\t.quad 0x2000000000000002, 0x0000000004000000\n-\t.quad 0x2002000004200002, 0x2000000000000802\n-\t.quad 0x0000000004000800, 0x2002000000200802\n-\t.quad 0x2002000000200002, 0x0000000004000800\n-\t.quad 0x2000000004000002, 0x0002000004200000\n-\t.quad 0x0002000004200800, 0x2002000000200002\n-\t.quad 0x0002000004200000, 0x0000000000000800\n-\t.quad 0x2000000000000802, 0x2002000004200802\n-\t.quad 0x0002000000200800, 0x2000000000000002\n-\t.quad 0x0000000004000000, 0x0002000000200800\n-\t.quad 0x0000000004000000, 0x0002000000200800\n-\t.quad 0x0002000000200000, 0x2000000004000802\n-\t.quad 0x2000000004000802, 0x2002000004200002\n-\t.quad 0x2002000004200002, 0x2000000000000002\n-\t.quad 0x2002000000200002, 0x0000000004000000\n-\t.quad 0x0000000004000800, 0x0002000000200000\n-\t.quad 0x0002000004200800, 0x2000000000000802\n-\t.quad 0x2002000000200802, 0x0002000004200800\n-\t.quad 0x2000000000000802, 0x2000000004000002\n-\t.quad 0x2002000004200802, 0x0002000004200000\n-\t.quad 0x0002000000200800, 0x0000000000000000\n-\t.quad 0x2000000000000002, 0x2002000004200802\n-\t.quad 0x0000000000000000, 0x2002000000200802\n-\t.quad 0x0002000004200000, 0x0000000000000800\n-\t.quad 0x2000000004000002, 0x0000000004000800\n-\t.quad 0x0000000000000800, 0x2002000000200002\n-.L_s8:\n-\t.quad 0x0100010410001000, 0x0000010000001000\n-\t.quad 0x0000000000040000, 0x0100010410041000\n-\t.quad 0x0100000010000000, 0x0100010410001000\n-\t.quad 0x0000000400000000, 0x0100000010000000\n-\t.quad 0x0000000400040000, 0x0100000010040000\n-\t.quad 0x0100010410041000, 0x0000010000041000\n-\t.quad 0x0100010010041000, 0x0000010400041000\n-\t.quad 0x0000010000001000, 0x0000000400000000\n-\t.quad 0x0100000010040000, 0x0100000410000000\n-\t.quad 0x0100010010001000, 0x0000010400001000\n-\t.quad 0x0000010000041000, 0x0000000400040000\n-\t.quad 0x0100000410040000, 0x0100010010041000\n-\t.quad 0x0000010400001000, 0x0000000000000000\n-\t.quad 0x0000000000000000, 0x0100000410040000\n-\t.quad 0x0100000410000000, 0x0100010010001000\n-\t.quad 0x0000010400041000, 0x0000000000040000\n-\t.quad 0x0000010400041000, 0x0000000000040000\n-\t.quad 0x0100010010041000, 0x0000010000001000\n-\t.quad 0x0000000400000000, 0x0100000410040000\n-\t.quad 0x0000010000001000, 0x0000010400041000\n-\t.quad 0x0100010010001000, 0x0000000400000000\n-\t.quad 0x0100000410000000, 0x0100000010040000\n-\t.quad 0x0100000410040000, 0x0100000010000000\n-\t.quad 0x0000000000040000, 0x0100010410001000\n-\t.quad 0x0000000000000000, 0x0100010410041000\n-\t.quad 0x0000000400040000, 0x0100000410000000\n-\t.quad 0x0100000010040000, 0x0100010010001000\n-\t.quad 0x0100010410001000, 0x0000000000000000\n-\t.quad 0x0100010410041000, 0x0000010000041000\n-\t.quad 0x0000010000041000, 0x0000010400001000\n-\t.quad 0x0000010400001000, 0x0000000400040000\n-\t.quad 0x0100000010000000, 0x0100010010041000\ndiff --git a/arch/x86/crypto/des3_ede_glue.c b/arch/x86/crypto/des3_ede_glue.c\ndeleted file mode 100644\nindex 34600f90d8a6..000000000000\n--- a/arch/x86/crypto/des3_ede_glue.c\n+++ /dev/null\n@@ -1,391 +0,0 @@\n-// SPDX-License-Identifier: GPL-2.0-or-later\n-/*\n- * Glue Code for assembler optimized version of 3DES\n- *\n- * Copyright © 2014 Jussi Kivilinna <jussi.kivilinna@mbnet.fi>\n- *\n- * CBC & ECB parts based on code (crypto/cbc.c,ecb.c) by:\n- * Copyright (c) 2006 Herbert Xu <herbert@gondor.apana.org.au>\n- */\n-\n-#include <crypto/algapi.h>\n-#include <crypto/des.h>\n-#include <crypto/internal/skcipher.h>\n-#include <linux/crypto.h>\n-#include <linux/init.h>\n-#include <linux/module.h>\n-#include <linux/types.h>\n-\n-struct des3_ede_x86_ctx {\n-\tstruct des3_ede_ctx enc;\n-\tstruct des3_ede_ctx dec;\n-};\n-\n-/* regular block cipher functions */\n-asmlinkage void des3_ede_x86_64_crypt_blk(const u32 *expkey, u8 *dst,\n-\t\t\t\t\t const u8 *src);\n-\n-/* 3-way parallel cipher functions */\n-asmlinkage void des3_ede_x86_64_crypt_blk_3way(const u32 *expkey, u8 *dst,\n-\t\t\t\t\t const u8 *src);\n-\n-static inline void des3_ede_enc_blk(struct des3_ede_x86_ctx *ctx, u8 *dst,\n-\t\t\t\t const u8 *src)\n-{\n-\tu32 *enc_ctx = ctx->enc.expkey;\n-\n-\tdes3_ede_x86_64_crypt_blk(enc_ctx, dst, src);\n-}\n-\n-static inline void des3_ede_dec_blk(struct des3_ede_x86_ctx *ctx, u8 *dst,\n-\t\t\t\t const u8 *src)\n-{\n-\tu32 *dec_ctx = ctx->dec.expkey;\n-\n-\tdes3_ede_x86_64_crypt_blk(dec_ctx, dst, src);\n-}\n-\n-static inline void des3_ede_dec_blk_3way(struct des3_ede_x86_ctx *ctx, u8 *dst,\n-\t\t\t\t\t const u8 *src)\n-{\n-\tu32 *dec_ctx = ctx->dec.expkey;\n-\n-\tdes3_ede_x86_64_crypt_blk_3way(dec_ctx, dst, src);\n-}\n-\n-static void des3_ede_x86_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)\n-{\n-\tdes3_ede_enc_blk(crypto_tfm_ctx(tfm), dst, src);\n-}\n-\n-static void des3_ede_x86_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)\n-{\n-\tdes3_ede_dec_blk(crypto_tfm_ctx(tfm), dst, src);\n-}\n-\n-static int ecb_crypt(struct skcipher_request *req, const u32 *expkey)\n-{\n-\tconst unsigned int bsize = DES3_EDE_BLOCK_SIZE;\n-\tstruct skcipher_walk walk;\n-\tunsigned int nbytes;\n-\tint err;\n-\n-\terr = skcipher_walk_virt(&walk, req, false);\n-\n-\twhile ((nbytes = walk.nbytes)) {\n-\t\tconst u8 *wsrc = walk.src.virt.addr;\n-\t\tu8 *wdst = walk.dst.virt.addr;\n-\n-\t\t/* Process four block batch */\n-\t\tif (nbytes >= bsize * 3) {\n-\t\t\tdo {\n-\t\t\t\tdes3_ede_x86_64_crypt_blk_3way(expkey, wdst,\n-\t\t\t\t\t\t\t wsrc);\n-\n-\t\t\t\twsrc += bsize * 3;\n-\t\t\t\twdst += bsize * 3;\n-\t\t\t\tnbytes -= bsize * 3;\n-\t\t\t} while (nbytes >= bsize * 3);\n-\n-\t\t\tif (nbytes < bsize)\n-\t\t\t\tgoto done;\n-\t\t}\n-\n-\t\t/* Handle leftovers */\n-\t\tdo {\n-\t\t\tdes3_ede_x86_64_crypt_blk(expkey, wdst, wsrc);\n-\n-\t\t\twsrc += bsize;\n-\t\t\twdst += bsize;\n-\t\t\tnbytes -= bsize;\n-\t\t} while (nbytes >= bsize);\n-\n-done:\n-\t\terr = skcipher_walk_done(&walk, nbytes);\n-\t}\n-\n-\treturn err;\n-}\n-\n-static int ecb_encrypt(struct skcipher_request *req)\n-{\n-\tstruct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);\n-\tstruct des3_ede_x86_ctx *ctx = crypto_skcipher_ctx(tfm);\n-\n-\treturn ecb_crypt(req, ctx->enc.expkey);\n-}\n-\n-static int ecb_decrypt(struct skcipher_request *req)\n-{\n-\tstruct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);\n-\tstruct des3_ede_x86_ctx *ctx = crypto_skcipher_ctx(tfm);\n-\n-\treturn ecb_crypt(req, ctx->dec.expkey);\n-}\n-\n-static unsigned int __cbc_encrypt(struct des3_ede_x86_ctx *ctx,\n-\t\t\t\t struct skcipher_walk *walk)\n-{\n-\tunsigned int bsize = DES3_EDE_BLOCK_SIZE;\n-\tunsigned int nbytes = walk->nbytes;\n-\tu64 *src = (u64 *)walk->src.virt.addr;\n-\tu64 *dst = (u64 *)walk->dst.virt.addr;\n-\tu64 *iv = (u64 *)walk->iv;\n-\n-\tdo {\n-\t\t*dst = *src ^ *iv;\n-\t\tdes3_ede_enc_blk(ctx, (u8 *)dst, (u8 *)dst);\n-\t\tiv = dst;\n-\n-\t\tsrc += 1;\n-\t\tdst += 1;\n-\t\tnbytes -= bsize;\n-\t} while (nbytes >= bsize);\n-\n-\t*(u64 *)walk->iv = *iv;\n-\treturn nbytes;\n-}\n-\n-static int cbc_encrypt(struct skcipher_request *req)\n-{\n-\tstruct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);\n-\tstruct des3_ede_x86_ctx *ctx = crypto_skcipher_ctx(tfm);\n-\tstruct skcipher_walk walk;\n-\tunsigned int nbytes;\n-\tint err;\n-\n-\terr = skcipher_walk_virt(&walk, req, false);\n-\n-\twhile (walk.nbytes) {\n-\t\tnbytes = __cbc_encrypt(ctx, &walk);\n-\t\terr = skcipher_walk_done(&walk, nbytes);\n-\t}\n-\n-\treturn err;\n-}\n-\n-static unsigned int __cbc_decrypt(struct des3_ede_x86_ctx *ctx,\n-\t\t\t\t struct skcipher_walk *walk)\n-{\n-\tunsigned int bsize = DES3_EDE_BLOCK_SIZE;\n-\tunsigned int nbytes = walk->nbytes;\n-\tu64 *src = (u64 *)walk->src.virt.addr;\n-\tu64 *dst = (u64 *)walk->dst.virt.addr;\n-\tu64 ivs[3 - 1];\n-\tu64 last_iv;\n-\n-\t/* Start of the last block. */\n-\tsrc += nbytes / bsize - 1;\n-\tdst += nbytes / bsize - 1;\n-\n-\tlast_iv = *src;\n-\n-\t/* Process four block batch */\n-\tif (nbytes >= bsize * 3) {\n-\t\tdo {\n-\t\t\tnbytes -= bsize * 3 - bsize;\n-\t\t\tsrc -= 3 - 1;\n-\t\t\tdst -= 3 - 1;\n-\n-\t\t\tivs[0] = src[0];\n-\t\t\tivs[1] = src[1];\n-\n-\t\t\tdes3_ede_dec_blk_3way(ctx, (u8 *)dst, (u8 *)src);\n-\n-\t\t\tdst[1] ^= ivs[0];\n-\t\t\tdst[2] ^= ivs[1];\n-\n-\t\t\tnbytes -= bsize;\n-\t\t\tif (nbytes < bsize)\n-\t\t\t\tgoto done;\n-\n-\t\t\t*dst ^= *(src - 1);\n-\t\t\tsrc -= 1;\n-\t\t\tdst -= 1;\n-\t\t} while (nbytes >= bsize * 3);\n-\t}\n-\n-\t/* Handle leftovers */\n-\tfor (;;) {\n-\t\tdes3_ede_dec_blk(ctx, (u8 *)dst, (u8 *)src);\n-\n-\t\tnbytes -= bsize;\n-\t\tif (nbytes < bsize)\n-\t\t\tbreak;\n-\n-\t\t*dst ^= *(src - 1);\n-\t\tsrc -= 1;\n-\t\tdst -= 1;\n-\t}\n-\n-done:\n-\t*dst ^= *(u64 *)walk->iv;\n-\t*(u64 *)walk->iv = last_iv;\n-\n-\treturn nbytes;\n-}\n-\n-static int cbc_decrypt(struct skcipher_request *req)\n-{\n-\tstruct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);\n-\tstruct des3_ede_x86_ctx *ctx = crypto_skcipher_ctx(tfm);\n-\tstruct skcipher_walk walk;\n-\tunsigned int nbytes;\n-\tint err;\n-\n-\terr = skcipher_walk_virt(&walk, req, false);\n-\n-\twhile (walk.nbytes) {\n-\t\tnbytes = __cbc_decrypt(ctx, &walk);\n-\t\terr = skcipher_walk_done(&walk, nbytes);\n-\t}\n-\n-\treturn err;\n-}\n-\n-static int des3_ede_x86_setkey(struct crypto_tfm *tfm, const u8 *key,\n-\t\t\t unsigned int keylen)\n-{\n-\tstruct des3_ede_x86_ctx *ctx = crypto_tfm_ctx(tfm);\n-\tu32 i, j, tmp;\n-\tint err;\n-\n-\terr = des3_ede_expand_key(&ctx->enc, key, keylen);\n-\tif (err == -ENOKEY) {\n-\t\tif (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS)\n-\t\t\terr = -EINVAL;\n-\t\telse\n-\t\t\terr = 0;\n-\t}\n-\n-\tif (err) {\n-\t\tmemset(ctx, 0, sizeof(*ctx));\n-\t\treturn err;\n-\t}\n-\n-\t/* Fix encryption context for this implementation and form decryption\n-\t * context. */\n-\tj = DES3_EDE_EXPKEY_WORDS - 2;\n-\tfor (i = 0; i < DES3_EDE_EXPKEY_WORDS; i += 2, j -= 2) {\n-\t\ttmp = ror32(ctx->enc.expkey[i + 1], 4);\n-\t\tctx->enc.expkey[i + 1] = tmp;\n-\n-\t\tctx->dec.expkey[j + 0] = ctx->enc.expkey[i + 0];\n-\t\tctx->dec.expkey[j + 1] = tmp;\n-\t}\n-\n-\treturn 0;\n-}\n-\n-static int des3_ede_x86_setkey_skcipher(struct crypto_skcipher *tfm,\n-\t\t\t\t\tconst u8 *key,\n-\t\t\t\t\tunsigned int keylen)\n-{\n-\treturn des3_ede_x86_setkey(&tfm->base, key, keylen);\n-}\n-\n-static struct crypto_alg des3_ede_cipher = {\n-\t.cra_name\t\t= \"des3_ede\",\n-\t.cra_driver_name\t= \"des3_ede-asm\",\n-\t.cra_priority\t\t= 200,\n-\t.cra_flags\t\t= CRYPTO_ALG_TYPE_CIPHER,\n-\t.cra_blocksize\t\t= DES3_EDE_BLOCK_SIZE,\n-\t.cra_ctxsize\t\t= sizeof(struct des3_ede_x86_ctx),\n-\t.cra_module\t\t= THIS_MODULE,\n-\t.cra_u = {\n-\t\t.cipher = {\n-\t\t\t.cia_min_keysize\t= DES3_EDE_KEY_SIZE,\n-\t\t\t.cia_max_keysize\t= DES3_EDE_KEY_SIZE,\n-\t\t\t.cia_setkey\t\t= des3_ede_x86_setkey,\n-\t\t\t.cia_encrypt\t\t= des3_ede_x86_encrypt,\n-\t\t\t.cia_decrypt\t\t= des3_ede_x86_decrypt,\n-\t\t}\n-\t}\n-};\n-\n-static struct skcipher_alg des3_ede_skciphers[] = {\n-\t{\n-\t\t.base.cra_name\t\t= \"ecb(des3_ede)\",\n-\t\t.base.cra_driver_name\t= \"ecb-des3_ede-asm\",\n-\t\t.base.cra_priority\t= 300,\n-\t\t.base.cra_blocksize\t= DES3_EDE_BLOCK_SIZE,\n-\t\t.base.cra_ctxsize\t= sizeof(struct des3_ede_x86_ctx),\n-\t\t.base.cra_module\t= THIS_MODULE,\n-\t\t.min_keysize\t\t= DES3_EDE_KEY_SIZE,\n-\t\t.max_keysize\t\t= DES3_EDE_KEY_SIZE,\n-\t\t.setkey\t\t\t= des3_ede_x86_setkey_skcipher,\n-\t\t.encrypt\t\t= ecb_encrypt,\n-\t\t.decrypt\t\t= ecb_decrypt,\n-\t}, {\n-\t\t.base.cra_name\t\t= \"cbc(des3_ede)\",\n-\t\t.base.cra_driver_name\t= \"cbc-des3_ede-asm\",\n-\t\t.base.cra_priority\t= 300,\n-\t\t.base.cra_blocksize\t= DES3_EDE_BLOCK_SIZE,\n-\t\t.base.cra_ctxsize\t= sizeof(struct des3_ede_x86_ctx),\n-\t\t.base.cra_module\t= THIS_MODULE,\n-\t\t.min_keysize\t\t= DES3_EDE_KEY_SIZE,\n-\t\t.max_keysize\t\t= DES3_EDE_KEY_SIZE,\n-\t\t.ivsize\t\t\t= DES3_EDE_BLOCK_SIZE,\n-\t\t.setkey\t\t\t= des3_ede_x86_setkey_skcipher,\n-\t\t.encrypt\t\t= cbc_encrypt,\n-\t\t.decrypt\t\t= cbc_decrypt,\n-\t}\n-};\n-\n-static bool is_blacklisted_cpu(void)\n-{\n-\tif (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)\n-\t\treturn false;\n-\n-\tif (boot_cpu_data.x86 == 0x0f) {\n-\t\t/*\n-\t\t * On Pentium 4, des3_ede-x86_64 is slower than generic C\n-\t\t * implementation because use of 64bit rotates (which are really\n-\t\t * slow on P4). Therefore blacklist P4s.\n-\t\t */\n-\t\treturn true;\n-\t}\n-\n-\treturn false;\n-}\n-\n-static int force;\n-module_param(force, int, 0);\n-MODULE_PARM_DESC(force, \"Force module load, ignore CPU blacklist\");\n-\n-static int __init des3_ede_x86_init(void)\n-{\n-\tint err;\n-\n-\tif (!force && is_blacklisted_cpu()) {\n-\t\tpr_info(\"des3_ede-x86_64: performance on this CPU would be suboptimal: disabling des3_ede-x86_64.\\n\");\n-\t\treturn -ENODEV;\n-\t}\n-\n-\terr = crypto_register_alg(&des3_ede_cipher);\n-\tif (err)\n-\t\treturn err;\n-\n-\terr = crypto_register_skciphers(des3_ede_skciphers,\n-\t\t\t\t\tARRAY_SIZE(des3_ede_skciphers));\n-\tif (err)\n-\t\tcrypto_unregister_alg(&des3_ede_cipher);\n-\n-\treturn err;\n-}\n-\n-static void __exit des3_ede_x86_fini(void)\n-{\n-\tcrypto_unregister_alg(&des3_ede_cipher);\n-\tcrypto_unregister_skciphers(des3_ede_skciphers,\n-\t\t\t\t ARRAY_SIZE(des3_ede_skciphers));\n-}\n-\n-module_init(des3_ede_x86_init);\n-module_exit(des3_ede_x86_fini);\n-\n-MODULE_LICENSE(\"GPL\");\n-MODULE_DESCRIPTION(\"Triple DES EDE Cipher Algorithm, asm optimized\");\n-MODULE_ALIAS_CRYPTO(\"des3_ede\");\n-MODULE_ALIAS_CRYPTO(\"des3_ede-asm\");\n-MODULE_AUTHOR(\"Jussi Kivilinna <jussi.kivilinna@iki.fi>\");\n", "prefixes": [ "3/3" ] }