Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[22.03] Add aarch64 asm accelerated versions of crypto algorihtms to kernel #10030

Closed

Conversation

cotequeiroz
Copy link
Member

This is the same as #9756, applied to 22.03. Just like I did in #9756, I compiled-tested the changes for all targets, but I don't have any of them to run-test.


This series adds armv8 Crypto Extensions accelerated versions of crypto algorithms to the following targets:

  • bcm4908
  • layerscape/armv8_64b
  • mvebu/cortexa53
  • mvebu/cortexa72
  • rockchip/armv8
  • sunxi/cortexa53
    Also:
  • octeontx was missing the CE optimized CRC T10 algorihtm, so it was added here.
  • bcm27xx/bcm2710 and bcm27xx/bcm2711 don't have the crypto extensions, so the SIMD neon versions were added instead.

mvebu/cortex{a53,a72} configs were given a refresh, although they are not strictly required.

For most targets, no algorithms were added if the regular C version was not included. I've made an exception for mvebu: I've mirrored the algorithms that the 32-bit cortex-a9 has. I found it rather odd that the asm config symbols were set at the target, not subtarget config, even though they only apply to the 32-bit a9. So, i mimicked what 86e27f1 had done to cortex-a9 and added the same algorithms to the 64-bit targets.

This enables arm64/neon version of AES, SHA256 and SHA512 algorithms in
the kernel.  bcm2710 does not support armv8 crypto extensions, so they
are not included.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 38ebb21)
This enables arm64/neon version of AES, SHA256 and SHA512 algorithms in
the kernel.  bcm2711 does not support armv8 crypto extensions, so they
are not included.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 7b6beb7)
This enables armv8 crypto extensions version of AES and GHASH algorithms
in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit b2cb87b)
This enables armv8 crypto extensions version of AES, GHASH, SHA256 and
CRC T10 algorithms in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit eb33232)
This is result of a plain make kernel_oldconfig CONFIG_TARGET=subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit a4c6384)
This enables armv8 crypto extensions version of AES, GHASH, SHA1,
SHA256, and SHA512 algorithms in the kernel.

The choice of algorithms match the 32-bit versions that are enabled in
the target config-5.10 file, but were only used by the cortexa9
subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit f5167e1)
This is result of a plain make kernel_oldconfig CONFIG_TARGET=subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 39b6af1)
This enables armv8 crypto extensions version of AES, GHASH, SHA1,
SHA256, and SHA512 algorithms in the kernel.

The choice of algorithms match the 32-bit versions that are enabled in
the target config-5.10 file, but were only used by the cortexa9
subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 06bb5ac)
Adds the crypto extensions version of the CRC T10 algorithm that is
already built into the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 1b94e4a)
This enables armv8 crypto extensions version of AES, GHASH, and CRC T10
algorithms in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit b1346d3)
This enables armv8 crypto extensions version of AES, GHASH, SHA1, and
CRC T10 algorithms in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 9be3518)
@cotequeiroz
Copy link
Member Author

@Ansuel
I think this can be safely merged to 22.03.

@Ansuel
Copy link
Member

Ansuel commented Jun 11, 2022

@cotequeiroz yhea will merge this ASAP

@Ansuel Ansuel added the kernel pull request/issue with Linux kernel related changes label Jun 11, 2022
@Ansuel
Copy link
Member

Ansuel commented Jun 11, 2022

Merged to openwrt-22.03 with

  • 23f0fea sunxi/cortexa53: enable armv8-CE crypto algorithms
  • 83dfa41 rockchip/armv8: enable armv8-CE crypto algorithms
  • 7f44677 octeontx: add armv8-CE version of CRC T10
  • 9ff2e7d mvebu/cortexa72: enable armv8-CE crypto algos
  • 75ffc99 mvebu/cortexa72: refresh kernel 5.10 config
  • cd25cc0 mvebu/cortexa53: enable armv8-CE crypto algos
  • 23bc97c mvebu/cortexa53: refresh kernel 5.10 config
  • 33dd466 layerscape/armv8_64b: enable armv8-CE crypto algos
  • 51f1480 bcm4908: enable armv8-CE crypto algorithms
  • 4101c81 bcm27xx/bcm2711: enable asm crypto algorithms
  • 8f393cf bcm27xx/bcm2710: enable asm crypto algorithms

@Ansuel Ansuel closed this Jun 11, 2022
@mans0n mans0n added the release/22.03 pull request/issue targeted (also) for OpenWrt 22.03 release label Jun 11, 2022
@cotequeiroz cotequeiroz deleted the arm64-kernel-crypto branch June 15, 2022 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel pull request/issue with Linux kernel related changes release/22.03 pull request/issue targeted (also) for OpenWrt 22.03 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants