linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] crypto: aesni - fix more FPU handling and indirect call issues
@ 2021-01-16 16:48 Ard Biesheuvel
  2021-01-16 16:48 ` [PATCH 1/2] crypto: aesni - replace CTR function pointer with static call Ard Biesheuvel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2021-01-16 16:48 UTC (permalink / raw)
  To: linux-crypto; +Cc: Ard Biesheuvel, Megha Dey, Eric Biggers, Herbert Xu

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-22  6:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-16 16:48 [PATCH 0/2] crypto: aesni - fix more FPU handling and indirect call issues Ard Biesheuvel
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

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).