All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Thomas <will.thomas@imgtec.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: <linux-crypto@vger.kernel.org>, <james.hartley@imgtec.com>
Subject: Re: [PATCH 5/6] crypto: img-hash - Add support for export and import
Date: Wed, 13 Jul 2016 15:01:38 +0100	[thread overview]
Message-ID: <578649C2.801@imgtec.com> (raw)
In-Reply-To: <20160712074929.GA29737@gondor.apana.org.au>

Hi Herbert,

I don't see any other drivers explicitly requesting a fallback
driver by name. Anyways, should this be done using  "sha1-generic"
in the crypto_alloc_ahash call when setting up the fallback tfm?

Thanks,
Will

On 12/07/16 08:49, Herbert Xu wrote:
> Will Thomas <will.thomas@imgtec.com> wrote:
>>
>> @@ -714,9 +740,12 @@ static struct ahash_alg img_algs[] = {
>>                .update = img_hash_update,
>>                .final = img_hash_final,
>>                .finup = img_hash_finup,
>> +               .export = img_hash_export,
>> +               .import = img_hash_import,
>>                .digest = img_hash_digest,
>>                .halg = {
>>                        .digestsize = MD5_DIGEST_SIZE,
>> +                       .statesize = sizeof(struct md5_state),
> 
> This is wrong.  The fallback state size is not guaranteed to be
> the same as the generic MD5.  I suppose the easiest fix is to
> explicitly request for md5-generic/sha1-generic/etc. when you
> allocate the fallback.
> 
> Thanks,
> 

  reply	other threads:[~2016-07-13 14:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11  9:33 [PATCH 0/6] crypto: img-hash - fixes and interface changes Will Thomas
2016-07-11  9:33 ` [PATCH 1/6] crypto: img-hash - Fix null pointer exception Will Thomas
2016-07-12  7:41   ` Herbert Xu
2016-07-11  9:33 ` [PATCH 2/6] crypto: img-hash - Fix hash request context Will Thomas
2016-07-12  7:43   ` Herbert Xu
2016-07-13 14:45     ` Will Thomas
2016-07-11  9:33 ` [PATCH 3/6] crypto: img-hash - Reconfigure DMA Burst length Will Thomas
2016-07-11  9:33 ` [PATCH 4/6] crypto: img-hash - Add suspend resume hooks for img hash Will Thomas
2016-07-11  9:33 ` [PATCH 5/6] crypto: img-hash - Add support for export and import Will Thomas
2016-07-12  7:49   ` Herbert Xu
2016-07-13 14:01     ` Will Thomas [this message]
2016-07-18  6:13       ` Herbert Xu
2016-07-11  9:33 ` [PATCH 6/6] crypto: img-hash - log a successful probe Will Thomas

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=578649C2.801@imgtec.com \
    --to=will.thomas@imgtec.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=james.hartley@imgtec.com \
    --cc=linux-crypto@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.