From patchwork Mon Jun 24 17:38:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 167631 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4500731ilk; Mon, 24 Jun 2019 10:39:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqye1Rqk6GosgA5iyhxAjwM4QXNo3iKmU9j3ka4cS+OoOHlwgbZjfDZTYyvoh9e2ubwjkFNL X-Received: by 2002:a17:90a:33c4:: with SMTP id n62mr26898096pjb.28.1561397961023; Mon, 24 Jun 2019 10:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561397961; cv=none; d=google.com; s=arc-20160816; b=RdiJdWBeOhJB9NgmQGaLjJyxv+W6p5iLQJDkfDe0TUK8cxMhGvr+SxAc6jN56z2u+3 sd48uNKUyc9asj7DroEF8qvIhBlqaJR2Bq1Ta0yCTS5hgln5chhgMocjWNmW3yW4ZdFF /KHl98yNUqZlpH1RWgkxDCF2cYLb5r4ytm0Ih45IhRI0hHPuDjGj8LYiQhxj2CiZNEOx 0JOckCNonDYpLqAw8hRf35QW+8f1CD6AMf9aBp4bIXZ7a3Oa5FKfZRC1Hp7Pz3ofgZy5 o/jyzi7kzOqYSpZvkMMuBgJD20lubfu9RyJzFKNKP1YDcBuBJ9RPoMzbJ2e5KbWcEGIC tz7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vkM3pzv0qaT9ifNnV69G72X1aA/dSIdngKbA6f9L9fY=; b=auIx8v0zwr18c047vpIMa5VMDscCVls2uOFfo8OQzHDhD9k1Du/xZ0QzinfQkt1+38 oVdu5hnK9pPjKqaFkY2QkeB/GBEoULDoC4JZOyWStJj/AmRHG94QIL4caw2/mjq9oEr+ HlhN/kxoB71LA7jvQPSbViTflZsq2DRskEgFlgtnxAvkXQ54oIPvVy3o6NNJUNePpCm+ XKhDm9vr1ykyWmLCbRnwHpgV3D3p/eBlrZ7wLAo7PExOhY2IfS3ak/yMZN5GvfyMCwAO Q/bIelx32sgbvqITimw7zvqKOcbj7aE90DzkAxtSmAsI+A1GtV+JV/iwJ213szK49Rs2 dXuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QfsDv58L; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 188si11961707pfv.146.2019.06.24.10.39.20; Mon, 24 Jun 2019 10:39:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QfsDv58L; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728053AbfFXRjU (ORCPT + 3 others); Mon, 24 Jun 2019 13:39:20 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40632 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727806AbfFXRjU (ORCPT ); Mon, 24 Jun 2019 13:39:20 -0400 Received: by mail-wm1-f65.google.com with SMTP id v19so177748wmj.5 for ; Mon, 24 Jun 2019 10:39:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vkM3pzv0qaT9ifNnV69G72X1aA/dSIdngKbA6f9L9fY=; b=QfsDv58LbAH8cF3V4G/2L5+c7LJ29FHs0XfEC6n7avNrzdSgDotlJCn10i3fqI/jZc ih7K94fQSLld6liaWtuqOw3YwyzQWybXLW3wI6HMqUkS067Kjrk+f4ZyGIFgB5bL6KLc B/49i7nsBjlsflmhFrNJxOrEJM3F0tjU6dr/mJP9KtI76og2oSrBG8u4d3In0NdNzTNp Hd6ha2Pml7eEDgaVle/FiF5ehhaNUcmOXAiLXyP1yqTk/35kuktOaDLyNppfm9DPHpuq Fc/w5Uo8yIlaNU3JGOY4Rr3KRZwYILJ9X1eNmRol62GrYP7jcQS7LCCHBvFYv90+gVJV JZ5g== 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:mime-version :content-transfer-encoding; bh=vkM3pzv0qaT9ifNnV69G72X1aA/dSIdngKbA6f9L9fY=; b=bhHLYUvXBsyvRJzM02fX+VDKLkJN8tLXF32ibEt9Bkst6IgteZH57v/zWkQ7HgqyfQ 0Fgjiz400wFvM8Mq5ea32errj4jTxRPTuyiADOqhDj30BU5Wo0Q1AJf/Wq1aZe8sGjTS JfjNYS/03ddZ+VpHhxAooQ7TWvF6Z4xdkU6PQErpf/ZdD/5/IlqV5dda7sZlob25yqPI rXEc7cVLvfcHNB+y7B7jR5o68vQRdRAfVyukVohX+mF161gzKlWPpe1X/tvzhl0R816d r7f2jteG072kqvMsMHrOiNQndYX7JO+SRCaJm4/8+snoZKozHWXsYHgirCjbaAZEOWi9 AHbg== X-Gm-Message-State: APjAAAW/YFBzk3NUmYeEsnfJTH4VbfBPe0CQH8ndXGovWjaiJzQ86Cl0 Y/7rVcFea9pSeJ4Xz9BrScSaAz5uskA= X-Received: by 2002:a7b:c7c2:: with SMTP id z2mr15780801wmk.147.1561397957796; Mon, 24 Jun 2019 10:39:17 -0700 (PDT) Received: from localhost.localdomain (aaubervilliers-681-1-10-211.w90-88.abo.wanadoo.fr. [90.88.131.211]) by smtp.gmail.com with ESMTPSA id s10sm260787wmf.8.2019.06.24.10.39.16 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 24 Jun 2019 10:39:17 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, ebiggers@kernel.org, linux-arm-kernel@lists.infradead.org, steve.capper@arm.com, Ard Biesheuvel Subject: [PATCH 0/2] crypto: arm64/aes-ce - implement 5-way interleave for some modes Date: Mon, 24 Jun 2019 19:38:29 +0200 Message-Id: <20190624173831.8375-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org As it turns out, even a 4-way interleave is not sufficient to saturate the ThunderX2 pipeline with AES instructions, so this series implements 5-way interleave for modes that can be modified without running out of registers to maintain chaining mode state across the encryption operation, i.e., ECB, CBC-decryption and CTR. Ard Biesheuvel (2): crypto: arm64/aes-ce - add 5 way interleave routines crypto: arm64/aes-ce - implement 5 way interleave for ECB, CBC and CTR arch/arm64/crypto/aes-ce.S | 60 ++++++---- arch/arm64/crypto/aes-modes.S | 118 +++++++++++++++----- arch/arm64/crypto/aes-neon.S | 48 +------- 3 files changed, 127 insertions(+), 99 deletions(-) -- 2.20.1