From: Eric Biggers Date: Thu, 14 Feb 2019 08:03:54 +0000 (-0800) Subject: crypto: arm64/aes-blk - update IV after partial final CTR block X-Git-Tag: v5.4-rc1~1405^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa5fd3afc7e64473bd9d417726c046b322ec0696;p=platform%2Fkernel%2Flinux-rpi.git crypto: arm64/aes-blk - update IV after partial final CTR block Make the arm64 ctr-aes-neon and ctr-aes-ce algorithms update the IV buffer to contain the next counter after processing a partial final block, rather than leave it as the last counter. This makes these algorithms pass the updated AES-CTR tests. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu --- diff --git a/arch/arm64/crypto/aes-modes.S b/arch/arm64/crypto/aes-modes.S index 6770004..4c7ce23 100644 --- a/arch/arm64/crypto/aes-modes.S +++ b/arch/arm64/crypto/aes-modes.S @@ -320,8 +320,7 @@ AES_ENTRY(aes_ctr_encrypt) .Lctrtailblock: st1 {v0.16b}, [x0] - ldp x29, x30, [sp], #16 - ret + b .Lctrout .Lctrcarry: umov x7, v4.d[0] /* load upper word of ctr */