On Sat, May 23, 2015 at 08:04:19PM +0200, Stephan Mueller wrote: > Am Freitag, 22. Mai 2015, 16:31:04 schrieb Herbert Xu: > > Hi Herbert, > > > This patch makes use of the new AEAD interface which uses a single > > SG list instead of separate lists for the AD and plain text. > > After applying your additional patch, the "normal" AEAD operation works. > > But with long messages (16 filled pages), I get the following. To test, simply > use [1], cd libkcapi/test, compile and execute ./kcapi -y Thanks for testing! Does this patch help? diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c index a483a6f..1d08483 100644 --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c @@ -494,11 +494,11 @@ static int aead_recvmsg(struct socket *sock, struct msghdr *msg, size_t ignored, else if (outlen) /* AD size is non-zero */ scatterwalk_crypto_chain( - dst, ctx->rsgl[0].sg, + dst + i - 1, ctx->rsgl[0].sg, sg_page(ctx->rsgl[0].sg) == sg_page(dst + i - 1) && ctx->rsgl[0].sg[0].offset == dst[i - 1].offset + dst[i - 1].length, - i + 1); + 2); else /* AD only */ sg_mark_end(dst + i); Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html