Re: [PATCH 3/4] crypto: inside-secure - only update the result buffer when provided

2017-12-11 Thread Herbert Xu
On Mon, Dec 11, 2017 at 08:49:57AM +0100, Antoine Tenart wrote: > > So this patch is indeed fixing an issue, which should probably not be > there in the first place. I guess you recommend using a buffer local to > the driver instead, and only update areq->request on completion (final). That's one

Re: [PATCH 3/4] crypto: inside-secure - only update the result buffer when provided

2017-12-10 Thread Antoine Tenart
Hi Herbert, On Mon, Dec 11, 2017 at 06:29:46PM +1100, Herbert Xu wrote: > On Tue, Nov 28, 2017 at 10:05:17AM +0100, Antoine Tenart wrote: > > > > if (sreq->finish) > > result_sz = crypto_ahash_digestsize(ahash); > > - memcpy(sreq->state, areq->result, result_sz); > > + > > +

Re: [PATCH 3/4] crypto: inside-secure - only update the result buffer when provided

2017-12-10 Thread Herbert Xu
On Tue, Nov 28, 2017 at 10:05:17AM +0100, Antoine Tenart wrote: > The patch fixes the ahash support by only updating the result buffer > when provided. Otherwise the driver could crash with NULL pointer > exceptions, because the ahash caller isn't required to supply a result > buffer on all calls.

[PATCH 3/4] crypto: inside-secure - only update the result buffer when provided

2017-11-28 Thread Antoine Tenart
The patch fixes the ahash support by only updating the result buffer when provided. Otherwise the driver could crash with NULL pointer exceptions, because the ahash caller isn't required to supply a result buffer on all calls. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypt