Re: [PATCH v3] wusb: switch to cbcmac transform

2019-06-15 Thread Ard Biesheuvel
On Sun, 16 Jun 2019 at 03:20, Eric Biggers wrote: > > On Sat, Jun 15, 2019 at 11:17:45AM +0200, Ard Biesheuvel wrote: > > The wusb code takes a very peculiar approach at implementing CBC-MAC, > > by using plain CBC into a scratch buffer, and taking the output IV > > as the MAC. > > > > We can clea

Re: [PATCH v3] wusb: switch to cbcmac transform

2019-06-15 Thread Eric Biggers
On Sat, Jun 15, 2019 at 11:17:45AM +0200, Ard Biesheuvel wrote: > The wusb code takes a very peculiar approach at implementing CBC-MAC, > by using plain CBC into a scratch buffer, and taking the output IV > as the MAC. > > We can clean up this code substantially by switching to the cbcmac > shash,

[PATCH v3] wusb: switch to cbcmac transform

2019-06-15 Thread Ard Biesheuvel
The wusb code takes a very peculiar approach at implementing CBC-MAC, by using plain CBC into a scratch buffer, and taking the output IV as the MAC. We can clean up this code substantially by switching to the cbcmac shash, as exposed by the CCM template. To ensure that the module is loaded on dema

crypto/NX: Set receive window credits to max number of CRBs in RxFIFO

2019-06-15 Thread Haren Myneni
System gets checkstop if RxFIFO overruns with more requests than the maximum possible number of CRBs in FIFO at the same time. So find max CRBs from FIFO size and set it to receive window credits. CC: sta...@vger.kernel.org # v4.14+ Signed-off-by:Haren Myneni diff --git a/drivers/crypto/

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) {