From patchwork Tue Jan 17 15:22:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 91672 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp542908qgi; Tue, 17 Jan 2017 07:23:12 -0800 (PST) X-Received: by 10.98.200.5 with SMTP id z5mr44568929pff.0.1484666592258; Tue, 17 Jan 2017 07:23:12 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id h73si25302813pfh.1.2017.01.17.07.23.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 07:23:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cTVbL-0002BA-3G; Tue, 17 Jan 2017 15:23:11 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cTVbG-00029d-P4 for linux-arm-kernel@lists.infradead.org; Tue, 17 Jan 2017 15:23:08 +0000 Received: by mail-wm0-x22a.google.com with SMTP id c206so227910428wme.0 for ; Tue, 17 Jan 2017 07:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=DbLypd2iNX+szH0Zun1YFP0FH0ADlcocMLGsIJopwUo=; b=YIMC7mtdftBrUvu/YVmr5YyK9w5mODgqDsklvba0Exr2isQh/qVfxuVbyWagSm9eJd TMF9GLMLGBz0+r7Z8qZVZYluZoPXTEbG7/ZTpH9n5VE3TdmVu626in2SAryKXL2JeP7F l6lgvxfRBzuLQ9Ia8gWW4vVWja8fH1IeiyaNY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DbLypd2iNX+szH0Zun1YFP0FH0ADlcocMLGsIJopwUo=; b=Fm3gE2wMo2ptM5+v0q+ppu3JeLm6t7SgL7OBCKtp/mh/RMMvjbgGlLtuSDww+eImhm jv0bS0ACFTjcb3o9EqfdZ+ZFH5H/EjgDjqqY6WCFZqO7aRIdexnRMAoYCV7PHQBnTK0Q XXAdWu/H0tFKVioPSFuNL+fs6spuxalQLsO/8aw+9+B828jbXpHpdRW6Ls5ObXzWglg+ ZDSN7BayLfkIrOL5RSIJ1fdtiVfbg+yNMp0xLX+tyEmkvanG5m5BUW9RTdysJL/AL94U RcmNQX6KrXQ0aBtsm8WTVbTIzHI0rsVFv2ATGikafqMDM4raRksZZdHsCy5cDW1yNwKw qEFQ== X-Gm-Message-State: AIkVDXI/ZB509YW6WoNzKMbP5Pvnde3fmC9TYI/lySqwgd0u4I0OQTb2/glxK6r2rgVQ3sGY X-Received: by 10.28.138.136 with SMTP id m130mr15953687wmd.72.1484666564358; Tue, 17 Jan 2017 07:22:44 -0800 (PST) Received: from localhost.localdomain ([160.167.203.25]) by smtp.gmail.com with ESMTPSA id y127sm37590359wmg.12.2017.01.17.07.22.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 07:22:43 -0800 (PST) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au Subject: [PATCH 00/10] crypto - AES for ARM/arm64 updates for v4.11 (round #2) Date: Tue, 17 Jan 2017 15:22:27 +0000 Message-Id: <1484666557-31458-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170117_072306_977480_4EADC4EE X-CRM114-Status: GOOD ( 12.26 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Patch #1 is a fix for the CBC chaining issue that was discussed on the mailing list. The driver itself is queued for v4.11, so this fix can go right on top. Patches #2 - #6 clear the cra_alignmasks of various drivers: all NEON capable CPUs can perform unaligned accesses, and the advantage of using the slightly faster aligned accessors (which only exist on ARM not arm64) is certainly outweighed by the cost of copying data to suitably aligned buffers. NOTE: patch #5 won't apply unless 'crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes' is applied first, which was sent out separately as a bugfix for v3.16 - v4.9. If this is a problem, this patch can wait. Patch #7 and #8 are minor tweaks to the new scalar AES code. Patch #9 improves the performance of the plain NEON AES code, to make it more suitable as a fallback for the new bitsliced NEON code, which can only operate on 8 blocks in parallel, and needs another driver to perform CBC encryption or XTS tweak generation. Patch #10 updates the new bitsliced AES NEON code to switch to the plain NEON driver as a fallback. Patches #9 and #10 improve the performance of CBC encryption by ~35% on low end cores such as the Cortex-A53 that can be found in the Raspberry Pi3 Ard Biesheuvel (10): crypto: arm64/aes-neon-bs - honour iv_out requirement in CTR mode crypto: arm/aes-ce - remove cra_alignmask crypto: arm/chacha20 - remove cra_alignmask crypto: arm64/aes-ce-ccm - remove cra_alignmask crypto: arm64/aes-blk - remove cra_alignmask crypto: arm64/chacha20 - remove cra_alignmask crypto: arm64/aes - avoid literals for cross-module symbol references crypto: arm64/aes - performance tweak crypto: arm64/aes-neon-blk - tweak performance for low end cores crypto: arm64/aes - replace scalar fallback with plain NEON fallback arch/arm/crypto/aes-ce-core.S | 84 ++++----- arch/arm/crypto/aes-ce-glue.c | 15 +- arch/arm/crypto/chacha20-neon-glue.c | 1 - arch/arm64/crypto/Kconfig | 2 +- arch/arm64/crypto/aes-ce-ccm-glue.c | 1 - arch/arm64/crypto/aes-cipher-core.S | 59 +++--- arch/arm64/crypto/aes-glue.c | 18 +- arch/arm64/crypto/aes-modes.S | 8 +- arch/arm64/crypto/aes-neon.S | 199 ++++++++------------ arch/arm64/crypto/aes-neonbs-core.S | 25 ++- arch/arm64/crypto/aes-neonbs-glue.c | 38 +++- arch/arm64/crypto/chacha20-neon-glue.c | 1 - 12 files changed, 199 insertions(+), 252 deletions(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel