Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: linux-crypto@vger.kernel.org
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: Crypto test results unused?
Date: Mon, 28 Dec 2009 21:14:17 +0100	[thread overview]
Message-ID: <m37hs6rh46.fsf@intrepid.localdomain> (raw)
In-Reply-To: <m3ws07q865.fsf@intrepid.localdomain> (Krzysztof Halasa's message of "Mon, 28 Dec 2009 19:12:50 +0100")

Krzysztof Halasa <khc@pm.waw.pl> writes:

> is the core crypto code supposed to "kill" algorithms which fail the
> test?
>
> On little-endian IXP4xx 3 hardware-assisted algorithms fail (due to
> apparently unrelated bug which I will take care of). It seems the kernel
> is still using these failing algorithms (my debugging code adds extra
> fields to the /proc output):
>
> alg: skcipher: Test 1 failed on encryption for ecb(des)-ixp4xx
> 00000000: 01 23 45 67 89 ab cd e7
> alg: skcipher: Test 1 failed on encryption for ecb(des3_ede)-ixp4xx
> 00000000: 73 6f 6d 65 64 61 74 61
> alg: skcipher: Test 1 failed on encryption for ecb(aes)-ixp4xx
> 00000000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff
>
> # grep 'ecb(des)-ixp4xx\|ecb(des3_ede)-ixp4xx\|ecb(aes)-ixp4xx' /proc/cryp
> to -A 6
> driver       : ecb(aes)-ixp4xx
> module       : ixp4xx_crypto
> priority     : 300
> refcnt       : 1
> flags        : 0x85
> ptr          : 0xbf020074
> selftest     : unknown
> ^^^^^^^^^^^^^^^^^^^^^^

I think probably crypto_alg_tested() should mark the failing algorithm
somehow?
void crypto_alg_tested(const char *name, int err)
{
	...
found:
	q->cra_flags |= CRYPTO_ALG_DEAD;
	alg = test->adult;

  >>>>>>>>>>>>> maybe here? if (err) mark_as_failed(alg); <<<<<<<<<<<<<<<<

	if (err || list_empty(&alg->cra_list))
		goto complete;

	alg->cra_flags |= CRYPTO_ALG_TESTED;
-- 
Krzysztof Halasa

  parent reply	other threads:[~2009-12-28 20:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-28 18:12 Crypto test results unused? Krzysztof Halasa
2009-12-28 19:44 ` Krzysztof Halasa
2009-12-28 20:14 ` Krzysztof Halasa [this message]
2010-01-12 11:14 ` Herbert Xu
2010-01-12 17:55   ` Krzysztof Halasa
2010-01-12 22:44     ` Herbert Xu
2010-01-13 15:07       ` Krzysztof Halasa

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=m37hs6rh46.fsf@intrepid.localdomain \
    --to=khc@pm.waw.pl \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox