linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>, Megha Dey <megha.dey@intel.com>,
	Eric Biggers <ebiggers@google.com>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: [PATCH 0/2] crypto: aesni - fix more FPU handling and indirect call issues
Date: Sat, 16 Jan 2021 17:48:08 +0100	[thread overview]
Message-ID: <20210116164810.21192-1-ardb@kernel.org> (raw)

My recent patches to the AES-NI driver addressed all the instances of
indirect calls occurring in the XTS and GCM drivers, and while at it,
limited the scope of FPU enabled/preemption disabled regions not to
cover the work that goes on inside the skcipher walk API. This gets rid
of scheduling latency spikes for large skcipher/aead inputs, which are
more common these days after the introduction of s/w kTLS.

Let's address the other modes in this driver as well: ECB, CBC and CTR,
all of which currently keep the FPU enabled (and thus preemption disabled)
for the entire skcipher request, which is unnecessary, and potentially
problematic for workloads that are sensitive to scheduling latency.

Let's also switch to a static call for the CTR mode asm helper, which
gets chosen once at driver init time.

Cc: Megha Dey <megha.dey@intel.com>
Cc: Eric Biggers <ebiggers@google.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>

Ard Biesheuvel (2):
  crypto: aesni - replace CTR function pointer with static call
  crypto: aesni - release FPU during skcipher walk API calls

 arch/x86/crypto/aesni-intel_glue.c | 78 +++++++++-----------
 1 file changed, 35 insertions(+), 43 deletions(-)

-- 
2.17.1


             reply	other threads:[~2021-01-16 17:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-16 16:48 Ard Biesheuvel [this message]
2021-01-16 16:48 ` [PATCH 1/2] crypto: aesni - replace CTR function pointer with static call Ard Biesheuvel
2021-01-16 16:48 ` [PATCH 2/2] crypto: aesni - release FPU during skcipher walk API calls Ard Biesheuvel
2021-01-22  6:21 ` [PATCH 0/2] crypto: aesni - fix more FPU handling and indirect call issues Herbert Xu

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=20210116164810.21192-1-ardb@kernel.org \
    --to=ardb@kernel.org \
    --cc=ebiggers@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=megha.dey@intel.com \
    /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).