All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
To: ext Herbert Xu <herbert@gondor.hengli.com.au>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: crypto ahash error handling
Date: Wed, 10 Nov 2010 16:54:51 +0200	[thread overview]
Message-ID: <4CDAB23B.9000704@nokia.com> (raw)
In-Reply-To: <20101110122759.GA18577@gondor.apana.org.au>

This is not good.

Driver might allocate some resources, which needs to be released.
crypto_ahash_final() should do some kind of "cleanup" task.

- Dmitry

On 10/11/10 14:27, ext Herbert Xu wrote:
> Dmitry Kasatkin <dmitry.kasatkin@nokia.com> wrote:
>   
>> Hello,
>>
>> When using crypto ahash API, is it necessary/mandatory to call
>> crypto_ahash_final() if crypto_ahash_update() returns error...
>>
>> Basically it might happen after several calls while calculating hash if
>> HW error happens.
>> It is not possible to continue hash calculation. it is necessary to
>> reset HW and start whole hash again..
>>
>> Any comments?
>>     
> From the driver's perspective you cannot expect that the user
> will call crypto_ahash_final in this case, or for that matter in
> any other case as the user is always free to leave a hash in
> an unfinalised state.
>
> Cheers,
>   

  reply	other threads:[~2010-11-10 14:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-08  8:48 crypto ahash error handling Dmitry Kasatkin
2010-11-10 12:27 ` Herbert Xu
2010-11-10 14:54   ` Dmitry Kasatkin [this message]
2010-11-11 16:17     ` Herbert Xu
2010-11-11 18:11       ` Dmitry Kasatkin
2010-11-12  0:05         ` Herbert Xu
2010-11-12 11:30           ` Dmitry Kasatkin

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=4CDAB23B.9000704@nokia.com \
    --to=dmitry.kasatkin@nokia.com \
    --cc=herbert@gondor.hengli.com.au \
    --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.