All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Iles <jamie@jamieiles.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-crypto@vger.kernel.org,
	Corentin Labbe <clabbe.montjoie@gmail.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Ayush Sawal <ayush.sawal@chelsio.com>,
	Vinay Kumar Yadav <vinay.yadav@chelsio.com>,
	Rohit Maheshwari <rohitm@chelsio.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Jamie Iles <jamie@jamieiles.com>,
	Eric Biggers <ebiggers@google.com>, Tero Kristo <t-kristo@ti.com>,
	Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH v3 10/13] crypto: picoxcell - permit asynchronous skcipher as fallback
Date: Mon, 6 Jul 2020 17:05:39 +0100	[thread overview]
Message-ID: <20200706160539.GE84554@willow> (raw)
In-Reply-To: <20200630121907.24274-11-ardb@kernel.org>

On Tue, Jun 30, 2020 at 02:19:04PM +0200, Ard Biesheuvel wrote:
> Even though the picoxcell driver implements asynchronous versions of
> ecb(aes) and cbc(aes), the fallbacks it allocates are required to be
> synchronous. Given that SIMD based software implementations are usually
> asynchronous as well, even though they rarely complete asynchronously
> (this typically only happens in cases where the request was made from
> softirq context, while SIMD was already in use in the task context that
> it interrupted), these implementations are disregarded, and either the
> generic C version or another table based version implemented in assembler
> is selected instead.
> 
> Since falling back to synchronous AES is not only a performance issue, but
> potentially a security issue as well (due to the fact that table based AES
> is not time invariant), let's fix this, by allocating an ordinary skcipher
> as the fallback, and invoke it with the completion routine that was given
> to the outer request.
> 
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

Thanks Ard!

Reviewed-by: Jamie Iles <jamie@jamieiles.com>

  reply	other threads:[~2020-07-06 16:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 12:18 [PATCH v3 00/13] crypto: permit asynchronous skciphers as driver fallbacks Ard Biesheuvel
2020-06-30 12:18 ` [PATCH v3 01/13] crypto: amlogic-gxl - default to build as module Ard Biesheuvel
2020-07-06 17:41   ` Corentin Labbe
2020-06-30 12:18 ` [PATCH v3 02/13] crypto: amlogic-gxl - permit async skcipher as fallback Ard Biesheuvel
2020-07-06 17:42   ` Corentin Labbe
2020-06-30 12:18 ` [PATCH v3 03/13] crypto: omap-aes - permit asynchronous " Ard Biesheuvel
2020-06-30 12:18 ` [PATCH v3 04/13] crypto: sun4i " Ard Biesheuvel
2020-07-06 17:32   ` Corentin Labbe
2020-06-30 12:18 ` [PATCH v3 05/13] crypto: sun8i-ce " Ard Biesheuvel
2020-07-06 20:42   ` Corentin Labbe
2020-06-30 12:19 ` [PATCH v3 06/13] crypto: sun8i-ss " Ard Biesheuvel
2020-07-06 20:40   ` Corentin Labbe
2020-06-30 12:19 ` [PATCH v3 07/13] crypto: ccp " Ard Biesheuvel
2020-06-30 12:19 ` [PATCH v3 08/13] crypto: chelsio " Ard Biesheuvel
2020-06-30 12:19 ` [PATCH v3 09/13] crypto: mxs-dcp " Ard Biesheuvel
2020-07-05 18:28   ` Horia Geantă
2020-06-30 12:19 ` [PATCH v3 10/13] crypto: picoxcell " Ard Biesheuvel
2020-07-06 16:05   ` Jamie Iles [this message]
2020-06-30 12:19 ` [PATCH v3 11/13] crypto: qce " Ard Biesheuvel
2020-06-30 12:19 ` [PATCH v3 12/13] crypto: sahara " Ard Biesheuvel
2020-07-05 18:34   ` Horia Geantă
2020-06-30 12:19 ` [PATCH v3 13/13] crypto: mediatek - use AES library for GCM key derivation Ard Biesheuvel

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=20200706160539.GE84554@willow \
    --to=jamie@jamieiles.com \
    --cc=ardb@kernel.org \
    --cc=ayush.sawal@chelsio.com \
    --cc=clabbe.montjoie@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=festevam@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel@pengutronix.de \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=rohitm@chelsio.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=t-kristo@ti.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vinay.yadav@chelsio.com \
    --cc=wens@csie.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.