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.
Signed-off-by: Pankaj Gupta <[email protected]>
Signed-off-by: Arun Pathak <[email protected]>
---
drivers/crypto/caam/caamalg.c | 1 +
1 file changed, 1 insertion(+)
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 *
--
2.17.1
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: <[email protected]> # 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: <[email protected]> # 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: <[email protected]> # 4.2+
is better.
Thanks,
Horia
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.
Fixes: f2147b88b2b1 ("crypto: caam - Convert GCM to new AEAD interface")
Cc: <[email protected]> # 4.2+
Signed-off-by: Pankaj Gupta <[email protected]>
Signed-off-by: Arun Pathak <[email protected]>
---
drivers/crypto/caam/caamalg.c | 1 +
1 file changed, 1 insertion(+)
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 *
--
2.17.1
On 2/1/2019 7:50 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.
>
> Fixes: f2147b88b2b1 ("crypto: caam - Convert GCM to new AEAD interface")
> Cc: <[email protected]> # 4.2+
> Signed-off-by: Pankaj Gupta <[email protected]>
> Signed-off-by: Arun Pathak <[email protected]>
Reviewed-by: Horia Geant? <[email protected]>
Thanks,
Horia
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.
Fixes: f2147b88b2b1 ("crypto: caam - Convert GCM to new AEAD interface")
Cc: <[email protected]> # 4.2+
Signed-off-by: Pankaj Gupta <[email protected]>
Signed-off-by: Arun Pathak <[email protected]>
Reviewed-by: Horia Geanta <[email protected]>
---
drivers/crypto/caam/caamalg.c | 1 +
1 file changed, 1 insertion(+)
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 *
--
2.17.1
On Fri, Feb 01, 2019 at 07:18:20AM +0000, 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.
>
> Fixes: f2147b88b2b1 ("crypto: caam - Convert GCM to new AEAD interface")
> Cc: <[email protected]> # 4.2+
> Signed-off-by: Pankaj Gupta <[email protected]>
> Signed-off-by: Arun Pathak <[email protected]>
> Reviewed-by: Horia Geanta <[email protected]>
> ---
> drivers/crypto/caam/caamalg.c | 1 +
> 1 file changed, 1 insertion(+)
Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt