Message ID | 20190131070556.44832-1-pankaj.gupta@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Herbert Xu |
Headers | show |
Series | fixed caam driver handling of sg list. | expand |
Thanks Pankaj. On 1/31/2019 9:18 AM, Pankaj Gupta wrote: > when the source sg contains more than 1 fragment and > destination sg contains 1 fragment, the caam driver > mishandle the buffers to be sent to caam. > Patch subject prefix should be: "crypto: caam -" Please Cc stable by adding: Cc: <stable@vger.kernel.org> # 4.3+ The root cause is commit: f2147b88b2b1 ("crypto: caam - Convert GCM to new AEAD interface") however the issue was not visible until the switch to new AEAD interface completed, in commit: 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface") Thus it's probably correct to also add Fixes: 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface") Horia P.S. You are supposed to add driver maintainers in the loop, see MAINTAINERS file and the handy scripts/get_maintainer.pl.
On 1/31/2019 11:38 AM, Horia Geanta wrote: > Thanks Pankaj. > > On 1/31/2019 9:18 AM, Pankaj Gupta wrote: >> when the source sg contains more than 1 fragment and >> destination sg contains 1 fragment, the caam driver >> mishandle the buffers to be sent to caam. >> > Patch subject prefix should be: "crypto: caam -" > > Please Cc stable by adding: > Cc: <stable@vger.kernel.org> # 4.3+ > > The root cause is commit: > f2147b88b2b1 ("crypto: caam - Convert GCM to new AEAD interface") > > however the issue was not visible until the switch to new AEAD interface > completed, in commit: > 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface") > > Thus it's probably correct to also add > Fixes: 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface") > Actually for gcm the issue should show up from the very beginning, so Fixes: f2147b88b2b1 ("crypto: caam - Convert GCM to new AEAD interface") Cc: <stable@vger.kernel.org> # 4.2+ is better. Thanks, Horia
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 2ec6e8cbf026..49f436230fb8 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -1056,6 +1056,7 @@ static void init_aead_job(struct aead_request *req, if (unlikely(req->src != req->dst)) { if (edesc->dst_nents == 1) { dst_dma = sg_dma_address(req->dst); + out_options = 0; } else { dst_dma = edesc->sec4_sg_dma + sec4_sg_index *