mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
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
This commit is contained in:
committed by
Brian Behlendorf
parent
3d503a76e8
commit
010d12474c
@@ -35,6 +35,7 @@
|
||||
#include <sys/modctl.h>
|
||||
#define _AES_IMPL
|
||||
#include <aes/aes_impl.h>
|
||||
#include <modes/gcm_impl.h>
|
||||
|
||||
#define CRYPTO_PROVIDER_NAME "aes"
|
||||
|
||||
@@ -205,6 +206,10 @@ aes_mod_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* find fastest implementations and set any requested implementations */
|
||||
aes_impl_init();
|
||||
gcm_impl_init();
|
||||
|
||||
if ((ret = mod_install(&modlinkage)) != 0)
|
||||
return (ret);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user