linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 7/8] crypto: arm64/aes-xts-ce: fix for big endian
Date: Tue, 11 Oct 2016 19:15:19 +0100	[thread overview]
Message-ID: <1476209720-21114-8-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1476209720-21114-1-git-send-email-ard.biesheuvel@linaro.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 <ard.biesheuvel@linaro.org>
---
 arch/arm64/crypto/aes-ce.S    | 1 +
 arch/arm64/crypto/aes-modes.S | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

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 <linux/linkage.h>
+#include <asm/assembler.h>
 
 #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
-- 
2.7.4

  parent reply	other threads:[~2016-10-11 18:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-11 18:15 [PATCH v2 0/8] crypto: ARM/arm64 - big endian fixes Ard Biesheuvel
2016-10-11 18:15 ` [PATCH v2 1/8] crypto: arm64/aes-ce - fix for big endian Ard Biesheuvel
2016-10-11 18:15 ` [PATCH v2 2/8] crypto: arm64/ghash-ce " Ard Biesheuvel
2016-10-11 18:15 ` [PATCH v2 3/8] crypto: arm64/sha1-ce " Ard Biesheuvel
2016-10-11 18:15 ` [PATCH v2 4/8] crypto: arm64/sha2-ce " Ard Biesheuvel
2016-10-11 18:15 ` [PATCH v2 5/8] crypto: arm64/aes-ccm-ce: " Ard Biesheuvel
2016-10-11 18:15 ` [PATCH v2 6/8] crypto: arm64/aes-neon - " Ard Biesheuvel
2016-10-11 18:15 ` Ard Biesheuvel [this message]
2016-10-11 18:15 ` [PATCH v2 8/8] crypto: arm/aes-ce " Ard Biesheuvel
2016-10-18 10:55 ` [PATCH v2 0/8] crypto: ARM/arm64 - big endian fixes Ard Biesheuvel
2016-10-18 11:49 ` Catalin Marinas
2016-10-18 12:14   ` Ard Biesheuvel
2016-10-19  3:03     ` Herbert Xu
2016-10-19  8:46       ` Will Deacon
2016-10-19  8:49         ` Ard Biesheuvel
2016-10-19  9:15           ` Will Deacon
2016-10-21  3:16 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1476209720-21114-8-git-send-email-ard.biesheuvel@linaro.org \
    --to=ard.biesheuvel@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).