Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1572379 > unrolled thread

Re: [PATCH v3 2/3] crypto: brcm: Add Broadcom SPU driver

Started byHerbert Xu <herbert@gondor.apana.org.au>
First post2017-02-02 15:10 +0100
Last post2017-02-02 16:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 2/3] crypto: brcm: Add Broadcom SPU driver Herbert Xu <herbert@gondor.apana.org.au> - 2017-02-02 15:10 +0100
    Re: [PATCH v3 2/3] crypto: brcm: Add Broadcom SPU driver Rob Rice <rob.rice@broadcom.com> - 2017-02-02 16:20 +0100

#1572379 — Re: [PATCH v3 2/3] crypto: brcm: Add Broadcom SPU driver

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2017-02-02 15:10 +0100
SubjectRe: [PATCH v3 2/3] crypto: brcm: Add Broadcom SPU driver
Message-ID<t6qff-54C-7@gated-at.bofh.it>
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?

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

[toc] | [next] | [standalone]


#1572458

FromRob Rice <rob.rice@broadcom.com>
Date2017-02-02 16:20 +0100
Message-ID<t6rl0-5HE-25@gated-at.bofh.it>
In reply to#1572379
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web