Skip to content

crypto: aesni - fix more FPU handling and indirect call issues

Ard Biesheuvel linux-crypto 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2crypto: aesni - replace CTR function pointer with static callarch/x86/crypto/aesni-intel_glue.c+7 -60 replies
2/2crypto: aesni - release FPU during skcipher walk API callsarch/x86/crypto/aesni-intel_glue.c+32 -410 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] crypto: aesni - fix more FPU handling and indirect call issues

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 <[email protected]>
Cc Eric Biggers <[email protected]>
Cc Herbert Xu <[email protected]>

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(-)
Signature · 1 line
2.17.1