crypto: arm64/aes-xts-ce: fix for big endian
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 11 Oct 2016 18:15:19 +0000 (19:15 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Oct 2016 03:03:45 +0000 (11:03 +0800)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/aes-ce.S
arch/arm64/crypto/aes-modes.S

index 78f3cfe92c0872345992203a6501ba0460cc2c91..b46093d567e5449256dbf3bf1d4981144bdd8739 100644 (file)
@@ -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)
index f6e372c528eb438b6517a236315afeb1694a8002..c53dbeae79f2f5fce8353b169e96ff6c79294aa5 100644 (file)
@@ -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