From: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
To: Eric Biggers <ebiggers@kernel.org>
Cc: "Emmanuel Gil Peyrot" <linkmauve@linkmauve.fr>,
linux-crypto@vger.kernel.org, "Ash Logan" <ash@heyquark.com>,
"Jonathan Neuschäfer" <j.ne@posteo.net>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
"Rob Herring" <robh+dt@kernel.org>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"Paul Mackerras" <paulus@samba.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 0/4] crypto: nintendo-aes - add a new AES driver
Date: Wed, 22 Sep 2021 00:37:24 +0200 [thread overview]
Message-ID: <20210921223724.ocxpdef6ptquprgz@luna> (raw)
In-Reply-To: <YUpVyTN7MQbMShdf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1920 bytes --]
On Tue, Sep 21, 2021 at 02:59:37PM -0700, Eric Biggers wrote:
> On Tue, Sep 21, 2021 at 11:39:26PM +0200, Emmanuel Gil Peyrot wrote:
> > This engine implements AES in CBC mode, using 128-bit keys only. It is
> > present on both the Wii and the Wii U, and is apparently identical in
> > both consoles.
> >
> > The hardware is capable of firing an interrupt when the operation is
> > done, but this driver currently uses a busy loop, I’m not too sure
> > whether it would be preferable to switch, nor how to achieve that.
> >
> > It also supports a mode where no operation is done, and thus could be
> > used as a DMA copy engine, but I don’t know how to expose that to the
> > kernel or whether it would even be useful.
> >
> > In my testing, on a Wii U, this driver reaches 80.7 MiB/s, while the
> > aes-generic driver only reaches 30.9 MiB/s, so it is a quite welcome
> > speedup.
> >
> > This driver was written based on reversed documentation, see:
> > https://wiibrew.org/wiki/Hardware/AES
> >
> > Emmanuel Gil Peyrot (4):
> > crypto: nintendo-aes - add a new AES driver
> > dt-bindings: nintendo-aes: Document the Wii and Wii U AES support
> > powerpc: wii.dts: Expose the AES engine on this platform
> > powerpc: wii_defconfig: Enable AES by default
>
> Does this pass the self-tests, including the fuzz tests which are enabled by
> CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y?
I wasn’t aware of those, and indeed it doesn’t pass them yet:
[ 0.680164] alg: skcipher: cbc-aes-nintendo encryption overran dst buffer on test vector 0, cfg="out-of-place"
[ 0.680201] fbcon: Taking over console
[ 0.680219] ------------[ cut here ]------------
[ 0.680222] alg: self-tests for cbc-aes-nintendo (cbc(aes)) failed (rc=-75)
I’ll try to figure out how to debug this and I’ll send a v2, thanks for
the hint!
>
> - Eric
--
Emmanuel Gil Peyrot
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-09-21 22:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 21:39 [PATCH 0/4] crypto: nintendo-aes - add a new AES driver Emmanuel Gil Peyrot
2021-09-21 21:39 ` [PATCH 1/4] " Emmanuel Gil Peyrot
2021-09-22 2:02 ` Joel Stanley
2021-09-28 9:00 ` Geert Uytterhoeven
2021-09-22 6:04 ` Corentin Labbe
2021-09-22 10:10 ` Ard Biesheuvel
2021-09-22 10:43 ` Emmanuel Gil Peyrot
2021-09-22 10:55 ` Ard Biesheuvel
2021-09-21 21:39 ` [PATCH 2/4] dt-bindings: nintendo-aes: Document the Wii and Wii U AES support Emmanuel Gil Peyrot
2021-09-27 18:01 ` Rob Herring
2021-09-21 21:39 ` [PATCH 3/4] powerpc: wii.dts: Expose the AES engine on this platform Emmanuel Gil Peyrot
2021-09-21 21:39 ` [PATCH 4/4] powerpc: wii_defconfig: Enable AES by default Emmanuel Gil Peyrot
2021-09-21 21:59 ` [PATCH 0/4] crypto: nintendo-aes - add a new AES driver Eric Biggers
2021-09-21 22:37 ` Emmanuel Gil Peyrot [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=20210921223724.ocxpdef6ptquprgz@luna \
--to=linkmauve@linkmauve.fr \
--cc=ash@heyquark.com \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=j.ne@posteo.net \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=robh+dt@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).