From patchwork Tue Oct 11 18:15:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 77516 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp121498qge; Tue, 11 Oct 2016 11:16:15 -0700 (PDT) X-Received: by 10.107.32.14 with SMTP id g14mr7462513iog.85.1476209775845; Tue, 11 Oct 2016 11:16:15 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si5147972pfk.12.2016.10.11.11.16.15; Tue, 11 Oct 2016 11:16:15 -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=neutral (body hash did not verify) header.i=@linaro.org; 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=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752426AbcJKSQO (ORCPT + 1 other); Tue, 11 Oct 2016 14:16:14 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:34913 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752924AbcJKSQJ (ORCPT ); Tue, 11 Oct 2016 14:16:09 -0400 Received: by mail-wm0-f54.google.com with SMTP id f193so834246wmg.0 for ; Tue, 11 Oct 2016 11:15:47 -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:in-reply-to:references; bh=CZbTgmRVvKpE50Wnj1QWrzQjDWcE8Gal3QnjpJRBaVE=; b=FuJIqJQrKwLh8r2qSN8GjhlwTgMvJIU4kknx9pMuooanChxwYq4Cg7BEbh/meQCx6k MEMvFu+sy4FpNAwXjIgv4rPeG+eCCLCXVWDljXPnMrzdCRCXxOfUHqWWrqrPPxGM/H7A i/muwcYb9prlo95RNJnykNf0GYOR2FwzlSXtY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CZbTgmRVvKpE50Wnj1QWrzQjDWcE8Gal3QnjpJRBaVE=; b=kI1MoID51XFFhN9pqv5yV/GnWaRz1CccwNonfDdpT37S5V4SR5eow00uIMN5Pt8IR/ bZZ+HYVpWngau5StTVNf1730bUQ1Bi6NNk0xjqBeERPTSxGCWMb0a/VFkuXJNUKqcgVZ fn+BhfYc1jIJYLakcLm/8Xt3XgYWSDpHOcKzxN/V3Gaf92799bnOBbp4YUn+h9luyKF5 /ZizE2pu0DvV9RUGQ9D7weKPb8oAnuaiEG9et2jXL08xWLzyrrZMDw7OFoeF+w4fFvc7 QRcPKhZ8dz1Zz1U3APcYUt4uRP6ueTnHhCXliM2V/Q7hEpp1N3T/VW/SxuJK/Z7q/aKm qLkA== X-Gm-Message-State: AA6/9Rm6yXSMKsMNBmZ15ToaFCMUy3M2beRXtBqYrjMNZlV6khGpqx1Xh0xLXlG4N54pGEU6 X-Received: by 10.194.108.230 with SMTP id hn6mr6593926wjb.122.1476209746854; Tue, 11 Oct 2016 11:15:46 -0700 (PDT) Received: from localhost.localdomain ([105.147.31.57]) by smtp.gmail.com with ESMTPSA id ya1sm8341523wjb.23.2016.10.11.11.15.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Oct 2016 11:15:46 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, herbert@gondor.apana.org.au Cc: will.deacon@arm.com, catalin.marinas@arm.com, linux@arm.linux.org.uk, Ard Biesheuvel Subject: [PATCH v2 7/8] crypto: arm64/aes-xts-ce: fix for big endian Date: Tue, 11 Oct 2016 19:15:19 +0100 Message-Id: <1476209720-21114-8-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476209720-21114-1-git-send-email-ard.biesheuvel@linaro.org> References: <1476209720-21114-1-git-send-email-ard.biesheuvel@linaro.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Emit the XTS tweak literal constants in the appropriate order for a single 128-bit scalar literal load. Fixes: 49788fe2a128 ("arm64/crypto: AES-ECB/CBC/CTR/XTS using ARMv8 NEON and Crypto Extensions") Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/aes-ce.S | 1 + arch/arm64/crypto/aes-modes.S | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/crypto/aes-ce.S b/arch/arm64/crypto/aes-ce.S index 78f3cfe92c08..b46093d567e5 100644 --- a/arch/arm64/crypto/aes-ce.S +++ b/arch/arm64/crypto/aes-ce.S @@ -10,6 +10,7 @@ */ #include +#include #define AES_ENTRY(func) ENTRY(ce_ ## func) #define AES_ENDPROC(func) ENDPROC(ce_ ## func) diff --git a/arch/arm64/crypto/aes-modes.S b/arch/arm64/crypto/aes-modes.S index f6e372c528eb..c53dbeae79f2 100644 --- a/arch/arm64/crypto/aes-modes.S +++ b/arch/arm64/crypto/aes-modes.S @@ -386,7 +386,8 @@ AES_ENDPROC(aes_ctr_encrypt) .endm .Lxts_mul_x: - .word 1, 0, 0x87, 0 +CPU_LE( .quad 1, 0x87 ) +CPU_BE( .quad 0x87, 1 ) AES_ENTRY(aes_xts_encrypt) FRAME_PUSH