linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gert Robben <t2@gert.gr>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>, linux-crypto@vger.kernel.org
Cc: herbert@gondor.apana.org.au, Jelle de Jong <jelledejong@powercraft.nl>
Subject: Re: [PATCH] crypto: geode-aes - switch to skcipher for cbc(aes) fallback
Date: Thu, 3 Oct 2019 23:26:21 +0200	[thread overview]
Message-ID: <64d5c8ec-41c5-1ef2-cc4b-a050bf4c48ba@gert.gr> (raw)
In-Reply-To: <20191003133921.29344-1-ard.biesheuvel@linaro.org>

Op 03-10-2019 om 15:39 schreef Ard Biesheuvel:
> Commit 79c65d179a40e145 ("crypto: cbc - Convert to skcipher") updated
> the generic CBC template wrapper from a blkcipher to a skcipher algo,
> to get away from the deprecated blkcipher interface. However, as a side
> effect, drivers that instantiate CBC transforms using the blkcipher as
> a fallback no longer work, since skciphers can wrap blkciphers but not
> the other way around. This broke the geode-aes driver.
> 
> So let's fix it by moving to the sync skcipher interface when allocating
> the fallback.
> 
> Cc: Gert Robben <t2@gert.gr>
> Cc: Jelle de Jong <jelledejong@powercraft.nl>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> Gert, Jelle,
> 
> If you can, please try this patch and report back to the list if it solves
> the Geode issue for you.

Thanks for the patch!
I tried it on Alix 2C2 / Geode LX800 with Linux 5.4-rc1 (also 5.1-5.3 fwiw).

At least now openssl doesn't give those errors anymore.
(openssl speed -evp aes-128-cbc -elapsed -engine afalg)
But looking at the results (<6MB/s), apparently it's not using geode-aes 
(>30MB/s?).
In dmesg can be seen:

alg: skcipher: ecb-aes-geode encryption test failed (wrong result) on 
test vector 1, cfg="out-of-place"
alg: skcipher: cbc-aes-geode encryption test failed (wrong result) on 
test vector 2, cfg="out-of-place"
Geode LX AES 0000:00:01.2: GEODE AES engine enabled.

In /proc/crypto, drivers cbc-aes-geode/ecb-aes-geode are listed with 
"selftest: unknown". Driver "geode-aes" has "selftest: passed".

I'm happy to test other patches.
Regards, Gert

  reply	other threads:[~2019-10-03 21:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 13:39 [PATCH] crypto: geode-aes - switch to skcipher for cbc(aes) fallback Ard Biesheuvel
2019-10-03 21:26 ` Gert Robben [this message]
2019-10-04  6:16   ` Ard Biesheuvel
2019-10-04 10:21     ` Florian Bezdeka
2019-10-04 12:08       ` Ard Biesheuvel
2019-10-04 13:29     ` Gert Robben
2019-10-04 19:37       ` Eric Biggers
2019-10-04 20:27         ` Gert Robben

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=64d5c8ec-41c5-1ef2-cc4b-a050bf4c48ba@gert.gr \
    --to=t2@gert.gr \
    --cc=ard.biesheuvel@linaro.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jelledejong@powercraft.nl \
    --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 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).