From f5e7d918a7cde95f2c2ff6c1645ba082961e06cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sat, 25 Dec 2021 04:37:22 +0100 Subject: [PATCH] module: icp: remove pre-set entries from mechtabs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They don't do anything except clogging up the AVL tree Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #12901 --- module/icp/core/kcf_mech_tabs.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/module/icp/core/kcf_mech_tabs.c b/module/icp/core/kcf_mech_tabs.c index 6121042ee..347190aa7 100644 --- a/module/icp/core/kcf_mech_tabs.c +++ b/module/icp/core/kcf_mech_tabs.c @@ -75,13 +75,8 @@ /* RFE 4687834 Will deal with the extensibility of these tables later */ -static kcf_mech_entry_t kcf_digest_mechs_tab[KCF_MAXDIGEST] = { - { SUN_CKM_SHA1 }, -}; -static kcf_mech_entry_t kcf_cipher_mechs_tab[KCF_MAXCIPHER] = { - { SUN_CKM_AES_CBC }, - { SUN_CKM_AES_ECB }, -}; +static kcf_mech_entry_t kcf_digest_mechs_tab[KCF_MAXDIGEST]; +static kcf_mech_entry_t kcf_cipher_mechs_tab[KCF_MAXCIPHER]; static kcf_mech_entry_t kcf_mac_mechs_tab[KCF_MAXMAC]; const kcf_mech_entry_tab_t kcf_mech_tabs_tab[KCF_LAST_OPSCLASS + 1] = { @@ -118,23 +113,8 @@ kcf_destroy_mech_tabs(void) void kcf_init_mech_tabs(void) { - kcf_ops_class_t class; - kcf_mech_entry_t *me_tab; - - /* Then the pre-defined mechanism entries */ avl_create(&kcf_mech_hash, kcf_mech_hash_compar, sizeof (kcf_mech_entry_t), offsetof(kcf_mech_entry_t, me_node)); - - for (class = KCF_FIRST_OPSCLASS; class <= KCF_LAST_OPSCLASS; class++) { - int max = kcf_mech_tabs_tab[class].met_size; - me_tab = kcf_mech_tabs_tab[class].met_tab; - for (int i = 0; i < max; i++) { - if (me_tab[i].me_name[0] != 0) { - me_tab[i].me_mechid = KCF_MECHID(class, i); - avl_add(&kcf_mech_hash, &me_tab[i]); - } - } - } } /*