lkml.org 
[lkml]   [2017]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2/3] crypto: brcm: Add Broadcom SPU driver
From
Date
Herbert,


> On Feb 2, 2017, at 9:05 AM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Wed, Jan 25, 2017 at 11:44:48AM -0500, Rob Rice wrote:
>>
>> +static int ahash_export(struct ahash_request *req, void *out)
>> +{
>> + const struct iproc_reqctx_s *rctx = ahash_request_ctx(req);
>> +
>> + memcpy(out, rctx, offsetof(struct iproc_reqctx_s, msg_buf));
>> + return 0;
>> +}
>
> The reqctx data structure seems to contain a lot of info unrelated
> to the hash state. Can't we get away with just copying the hash
> state (incr_hash) itself?

Yes, I see your point. I’ll whittle the export state down to just what’s needed for the hash.

>
> Cheers,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

\
 
 \ /
  Last update: 2017-02-02 16:12    [W:4.611 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site