linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Stephan Mueller <smueller@chronox.de>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] crypto: remove instance when test failed
Date: Fri, 10 Apr 2015 21:42:29 +0800	[thread overview]
Message-ID: <20150410134229.GA21873@gondor.apana.org.au> (raw)
In-Reply-To: <4399727.C1fCR46vxf@myon.chronox.de>

On Thu, Apr 09, 2015 at 12:09:55PM +0200, Stephan Mueller wrote:
> A cipher instance is added to the list of instances unconditionally
> regardless of whether the associated test failed. However, a failed
> test implies that during another lookup, the cipher instance will
> be added to the list again as it will not be found by the lookup
> code.
> 
> That means that the list can be filled up with instances whose tests
> failed.
> 
> Note: tests only fail in reality in FIPS mode when a cipher is not
> marked as fips_allowed=1. This can be seen with cmac(des3_ede) that does
> not have a fips_allowed=1. When allocating the cipher, the allocation
> fails with -ENOENT due to the missing fips_allowed=1 flag (which
> causes the testmgr to return EINVAL). Yet, the instance of
> cmac(des3_ede) is shown in /proc/crypto. Allocating the cipher again
> fails again, but a 2nd instance is listed in /proc/crypto.
> 
> The patch simply de-registers the instance when the testing failed.
> 
> Signed-off-by: Stephan Mueller <smueller@chronox.de>

Patch applied.  Thanks a lot!
-- 
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:[~2015-04-10 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 10:09 [PATCH v4] crypto: remove instance when test failed Stephan Mueller
2015-04-10 13:42 ` Herbert Xu [this message]

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=20150410134229.GA21873@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smueller@chronox.de \
    /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;
as well as URLs for NNTP newsgroup(s).