On Mon, Jun 15, 2015 at 08:59:51PM +0800, Herbert Xu wrote:
>
> > alg: aead: Test 2 failed on encryption for gcm-aes-caam
> > 00000000: ab 6e 47 d4 2c ec 13 bd f5 3a 67 b2 12 57 bd df
> > 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>
> But this one seems obvious. When assoclen is zero I failed to
> set VARSEQOUTLEN correctly for the cipher.
Please try this patch on top of it for the generic gcm failure.
Thanks!
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
index 95e8545..ca8948e 100644
--- a/drivers/crypto/caam/caamalg.c
+++ b/drivers/crypto/caam/caamalg.c
@@ -777,7 +777,7 @@ static int gcm_set_sh_desc(struct crypto_aead *aead)
OP_ALG_AS_INITFINAL | OP_ALG_ENCRYPT);
/* if assoclen + cryptlen is ZERO, skip to ICV write */
- append_math_sub(desc, NONE, SEQINLEN, REG0, CAAM_CMD_SZ);
+ append_math_sub(desc, VARSEQOUTLEN, SEQINLEN, REG0, CAAM_CMD_SZ);
zero_assoc_jump_cmd2 = append_jump(desc, JUMP_TEST_ALL |
JUMP_COND_MATH_Z);
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html