From: Herbert Xu Subject: Re: [PATCH v3 2/3] crypto: brcm: Add Broadcom SPU driver Date: Thu, 2 Feb 2017 22:05:10 +0800 Message-ID: <20170202140510.GB5289@gondor.apana.org.au> References: <1485362689-11294-1-git-send-email-rob.rice@broadcom.com> <1485362689-11294-3-git-send-email-rob.rice@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "David S. Miller" , Rob Herring , Mark Rutland , linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org, Catalin Marinas , Will Deacon , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Steve Lin To: Rob Rice Return-path: Content-Disposition: inline In-Reply-To: <1485362689-11294-3-git-send-email-rob.rice-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-crypto.vger.kernel.org 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 Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html