Skip to content

AES XTS x64 ASM: add AVX1 and AESNI implementations#6815

Merged
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
SparkiDev:aes_xts_x64
Sep 29, 2023
Merged

AES XTS x64 ASM: add AVX1 and AESNI implementations#6815
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
SparkiDev:aes_xts_x64

Conversation

@SparkiDev
Copy link
Copy Markdown
Contributor

Description

Adding AES-XTS AVX1 and AESNI implementations.
Fix name in comment at top of x64 assembly files.

Testing

Tested with and without xts and intelasm.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@SparkiDev SparkiDev self-assigned this Sep 27, 2023
@SparkiDev SparkiDev force-pushed the aes_xts_x64 branch 2 times, most recently from 149b54d to 52fd088 Compare September 28, 2023 07:17
Copy link
Copy Markdown
Contributor

@douzzer douzzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Performance is as hoped for:

AES-XTS-enc               5160 MiB took 1.001 seconds, 5155.927 MiB/s Cycles per byte =   0.63
AES-XTS-dec               5160 MiB took 1.001 seconds, 5156.762 MiB/s Cycles per byte =   0.63

and tests good loaded in the kernel, including kernel sanitizer:

[linuxkm-aesni-ksanitize-insmod] [1 of 2] [62481293ae]
    autogen.sh 62481293ae...   real 0m16.394s  user 0m14.380s  sys 0m1.151s
    configure...   real 0m9.814s  user 0m4.628s  sys 0m6.148s
    build...warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Gentoo 11.3.1_p20230427 p9) 11.3.1 20230427
  You are using:           gcc (Gentoo 12.3.1_p20230825 p2) 12.3.1 20230825
   real 0m30.510s  user 1m47.309s  sys 0m14.381s
    dracut...   real 0m16.023s  user 0m14.206s  sys 0m2.123s
    boot and insmod with self-test...done.
    [  350.338507] insmod (667) used greatest stack depth: 22312 bytes left
    linuxkm-aesni-ksanitize-insmod OK
[linuxkm-mainline-aesni-pie-gcc-latest-insmod] [2 of 2] [62481293ae]
    [targeting kernel /usr/src/linux-6.6-rc3]
    configure...   real 0m10.238s  user 0m4.737s  sys 0m6.572s
    build...warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Gentoo 12.3.1_p20230825 p2) 12.3.1 20230825
  You are using:           gcc-13 (Gentoo 13.2.1_p20230826 p7) 13.2.1 20230826
   real 0m16.002s  user 1m1.092s  sys 0m12.110s
    dracut...   real 0m11.856s  user 0m9.966s  sys 0m2.132s
    boot and insmod with self-test...done.
    [   68.798037] insmod (1195) used greatest stack depth: 9944 bytes left
    linuxkm-mainline-aesni-pie-gcc-latest-insmod OK

Changes in C files all look good. I ran my eyes over the asm but I'm basing my approval strictly on the automated test results 😉

@douzzer
Copy link
Copy Markdown
Contributor

douzzer commented Sep 28, 2023

Jenkins, retest this please.

Adding AES-XTS AVX1 and AESNI implementations.
Fix name in comment at top of x64 assembly files.
Copy link
Copy Markdown
Contributor

@JacobBarthelmeh JacobBarthelmeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good

@JacobBarthelmeh JacobBarthelmeh merged commit 53f729f into wolfSSL:master Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants