Issue with sg_copy_to_buffer() ? (was Re: [PATCH v3 2/4] crypto: talitos - fix hash on SEC1.)

2019-06-15 Thread Christophe Leroy
Le 15/06/2019 à 10:18, Christophe Leroy a écrit : @@ -2058,7 +2065,18 @@ static int ahash_process_req(struct ahash_request *areq, unsigned int nbytes)   sg_copy_to_buffer(areq->src, nents,     ctx_buf + req_ctx->nbuf, offset);   req_ctx->nbuf += offset; -  

Re: [PATCH v3 2/4] crypto: talitos - fix hash on SEC1.

2019-06-15 Thread Christophe Leroy
Le 14/06/2019 à 13:32, Horia Geanta a écrit : On 6/13/2019 3:48 PM, Christophe Leroy wrote: @@ -336,15 +336,18 @@ static void flush_channel(struct device *dev, int ch, int error, int reset_ch) tail = priv->chan[ch].tail; while (priv->chan[ch].fifo[tail].desc) {

Re: [PATCH v3 2/4] crypto: talitos - fix hash on SEC1.

2019-06-14 Thread Horia Geanta
On 6/13/2019 3:48 PM, Christophe Leroy wrote: > @@ -336,15 +336,18 @@ static void flush_channel(struct device *dev, int ch, > int error, int reset_ch) > tail = priv->chan[ch].tail; > while (priv->chan[ch].fifo[tail].desc) { > __be32 hdr; > + struct talitos_ede

Re: [PATCH v3 2/4] crypto: talitos - fix hash on SEC1.

2019-06-14 Thread Christophe Leroy
Le 13/06/2019 à 21:07, Horia Geanta a écrit : On 6/13/2019 3:48 PM, Christophe Leroy wrote: On SEC1, hash provides wrong result when performing hashing in several steps with input data SG list has more than one element. This was detected with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS: [ 44.185947]

Re: [PATCH v3 2/4] crypto: talitos - fix hash on SEC1.

2019-06-13 Thread Horia Geanta
On 6/13/2019 3:48 PM, Christophe Leroy wrote: > On SEC1, hash provides wrong result when performing hashing in several > steps with input data SG list has more than one element. This was > detected with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS: > > [ 44.185947] alg: hash: md5-talitos test failed (wrong

[PATCH v3 2/4] crypto: talitos - fix hash on SEC1.

2019-06-13 Thread Christophe Leroy
On SEC1, hash provides wrong result when performing hashing in several steps with input data SG list has more than one element. This was detected with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS: [ 44.185947] alg: hash: md5-talitos test failed (wrong result) on test vector 6, cfg="random: may_sleep use_f