]> git.proxmox.com Git - mirror_zfs.git/commit
Add support for selecting encryption backend
authorNathan Lewis <linux.robotdude@gmail.com>
Thu, 2 Aug 2018 18:59:24 +0000 (11:59 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 2 Aug 2018 18:59:24 +0000 (11:59 -0700)
commit010d12474cb1572c0c9b729615fa45cf43f59d14
tree90decc0e3097d799852e8befeb7d6b8a1a5f4be8
parent3d503a76e890d7711d5e906e025e092d0e244211
Add support for selecting encryption backend

- Add two new module parameters to icp (icp_aes_impl, icp_gcm_impl)
  that control the crypto implementation.  At the moment there is a
  choice between generic and aesni (on platforms that support it).
- This enables support for AES-NI and PCLMULQDQ-NI on AMD Family
  15h (bulldozer) and newer CPUs (zen).
- Modify aes_key_t to track what implementation it was generated
  with as key schedules generated with various implementations
  are not necessarily interchangable.

Reviewed by: Gvozden Neskovic <neskovic@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Nathaniel R. Lewis <linux.robotdude@gmail.com>
Closes #7102
Closes #7103
20 files changed:
cmd/ztest/ztest.c
config/toolchain-simd.m4
include/linux/simd_x86.h
include/sys/crypto/icp.h
lib/libicp/Makefile.am
module/icp/Makefile.in
module/icp/algs/aes/aes_impl.c
module/icp/algs/aes/aes_impl_aesni.c [new file with mode: 0644]
module/icp/algs/aes/aes_impl_generic.c [new file with mode: 0644]
module/icp/algs/aes/aes_impl_x86-64.c [new file with mode: 0644]
module/icp/algs/modes/gcm.c
module/icp/algs/modes/gcm_generic.c [new file with mode: 0644]
module/icp/algs/modes/gcm_pclmulqdq.c [new file with mode: 0644]
module/icp/asm-x86_64/aes/aes_aesni.S [new file with mode: 0644]
module/icp/asm-x86_64/aes/aes_intel.S [deleted file]
module/icp/asm-x86_64/modes/gcm_intel.S [deleted file]
module/icp/asm-x86_64/modes/gcm_pclmulqdq.S [new file with mode: 0644]
module/icp/include/aes/aes_impl.h
module/icp/include/modes/gcm_impl.h [new file with mode: 0644]
module/icp/io/aes.c