mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Cc: davem@davemloft.net, nicolas.ferre@atmel.com,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/5] crypto: atmel-sha: fix algorihtm registration
Date: Mon, 25 Jan 2016 15:23:34 +0800	[thread overview]
Message-ID: <20160125072334.GC5609@gondor.apana.org.au> (raw)
In-Reply-To: <49c8ccb4a2bd61eaab85d0cceba592f41ce7f21c.1452867917.git.cyrille.pitchen@atmel.com>

On Fri, Jan 15, 2016 at 03:49:35PM +0100, Cyrille Pitchen wrote:
>
> +static int atmel_sha_export(struct ahash_request *req, void *out)
> +{
> +	const struct atmel_sha_reqctx *ctx = ahash_request_ctx(req);
> +	struct atmel_sha_state *state = out;
> +
> +	memcpy(state->digest, ctx->digest, SHA512_DIGEST_SIZE);
> +	memcpy(state->buffer, ctx->buffer, ctx->bufcnt);
> +	state->bufcnt = ctx->bufcnt;
> +	state->digcnt[0] = ctx->digcnt[0];
> +	state->digcnt[1] = ctx->digcnt[1];
> +	return 0;
> +}

Hmm, you're assuming that out is aligned but that is not necessarily
the case.  Ditto for import.

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

  reply	other threads:[~2016-01-25  7:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 14:49 [PATCH 0/5] crypto: atmel-sha: fix registration issue and other bugs Cyrille Pitchen
2016-01-15 14:49 ` [PATCH 1/5] crypto: atmel-sha: fix crash when computing digest on empty message Cyrille Pitchen
2016-01-15 14:49 ` [PATCH 2/5] crypto: atmel-sha: fix a race between the 'done' tasklet and the crypto client Cyrille Pitchen
2016-01-15 14:49 ` [PATCH 3/5] crypto: atmel-sha: add support of sama5d2x SoCs Cyrille Pitchen
2016-01-15 14:49 ` [PATCH 4/5] crypto: atmel-sha: fix context switches Cyrille Pitchen
2016-01-15 14:49 ` [PATCH 5/5] crypto: atmel-sha: fix algorihtm registration Cyrille Pitchen
2016-01-25  7:23   ` Herbert Xu [this message]
2016-01-22 16:52 ` [PATCH 0/5] crypto: atmel-sha: fix registration issue and other bugs Nicolas Ferre
2016-01-25  7:25   ` Herbert Xu
2016-01-25 14:48 ` Herbert Xu
2016-01-25 14:56   ` Cyrille Pitchen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160125072334.GC5609@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=cyrille.pitchen@atmel.com \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®