crypto: arm64/aes-xts-ce: fix for big endian

Emit the XTS tweak literal constants in the appropriate order for a
single 128-bit scalar literal load.

Fixes: 49788fe2a1 ("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>
This commit is contained in:
Ard Biesheuvel 2016-10-11 19:15:19 +01:00 committed by Herbert Xu
parent a2c435cc99
commit caf4b9e2b3
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,7 @@
*/ */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/assembler.h>
#define AES_ENTRY(func) ENTRY(ce_ ## func) #define AES_ENTRY(func) ENTRY(ce_ ## func)
#define AES_ENDPROC(func) ENDPROC(ce_ ## func) #define AES_ENDPROC(func) ENDPROC(ce_ ## func)

View File

@ -386,7 +386,8 @@ AES_ENDPROC(aes_ctr_encrypt)
.endm .endm
.Lxts_mul_x: .Lxts_mul_x:
.word 1, 0, 0x87, 0 CPU_LE( .quad 1, 0x87 )
CPU_BE( .quad 0x87, 1 )
AES_ENTRY(aes_xts_encrypt) AES_ENTRY(aes_xts_encrypt)
FRAME_PUSH FRAME_PUSH