aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-12-24 17:04:32 +0100
committerBrian Behlendorf <[email protected]>2022-02-15 16:24:29 -0800
commitf3c3a6d47e0296723cf6a478283e6dfc3eb1cd96 (patch)
treed98b8a663e4fca1e189eb13f6e271419183847d6 /module
parentd77702035ae9db8db62f40a8ab35ce9d37751e4a (diff)
module: icp: remove unused p[di]_flags
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12901
Diffstat (limited to 'module')
-rw-r--r--module/icp/core/kcf_callprov.c3
-rw-r--r--module/icp/include/sys/crypto/impl.h6
-rw-r--r--module/icp/include/sys/crypto/spi.h20
-rw-r--r--module/icp/spi/kcf_spi.c19
4 files changed, 1 insertions, 47 deletions
diff --git a/module/icp/core/kcf_callprov.c b/module/icp/core/kcf_callprov.c
index 270579061..8059670a1 100644
--- a/module/icp/core/kcf_callprov.c
+++ b/module/icp/core/kcf_callprov.c
@@ -114,8 +114,7 @@ kcf_get_mech_provider(crypto_mech_type_t mech_type, kcf_mech_entry_t **mepp,
pd = mdesc->pm_prov_desc;
if (!IS_FG_SUPPORTED(mdesc, fg) ||
!KCF_IS_PROV_USABLE(pd) ||
- IS_PROVIDER_TRIED(pd, triedl) ||
- (pd->pd_flags & KCF_PROV_RESTRICTED))
+ IS_PROVIDER_TRIED(pd, triedl))
pd = NULL;
}
diff --git a/module/icp/include/sys/crypto/impl.h b/module/icp/include/sys/crypto/impl.h
index 8b45c0536..a2be8849c 100644
--- a/module/icp/include/sys/crypto/impl.h
+++ b/module/icp/include/sys/crypto/impl.h
@@ -145,9 +145,6 @@ typedef enum {
#define KCF_IS_PROV_USABLE(pd) ((pd)->pd_state == KCF_PROV_READY)
#define KCF_IS_PROV_REMOVED(pd) ((pd)->pd_state >= KCF_PROV_REMOVED)
-/* Internal flags valid for pd_flags field */
-#define KCF_PROV_RESTRICTED 0x40000000
-
/*
* A provider descriptor structure. There is one such structure per
* provider. It is allocated and initialized at registration time and
@@ -170,8 +167,6 @@ typedef enum {
* by the provider during registration
* pd_remove_cv: cv to wait on while the provider queue drains
* pd_description: Provider description string
- * pd_flags bitwise OR of pi_flags from crypto_provider_info_t
- * and other internal flags defined above.
* pd_hash_limit Maximum data size that hash mechanisms of this provider
* can support.
* pd_kcf_prov_handle: KCF-private handle assigned by KCF
@@ -195,7 +190,6 @@ typedef struct kcf_provider_desc {
uint_t pd_mech_list_count;
kcondvar_t pd_remove_cv;
const char *pd_description;
- uint_t pd_flags;
uint_t pd_hash_limit;
crypto_kcf_provider_handle_t pd_kcf_prov_handle;
crypto_provider_id_t pd_prov_id;
diff --git a/module/icp/include/sys/crypto/spi.h b/module/icp/include/sys/crypto/spi.h
index fdf8d8511..a047a30a0 100644
--- a/module/icp/include/sys/crypto/spi.h
+++ b/module/icp/include/sys/crypto/spi.h
@@ -236,13 +236,6 @@ typedef struct crypto_mech_info {
ssize_t cm_max_key_length;
uint32_t cm_mech_flags;
} crypto_mech_info_t;
-
-
-/*
- * The following is used by a provider that sets
- * CRYPTO_HASH_NO_UPDATE. It needs to specify the maximum
- * input data size it can digest in this field.
- */
#define cm_max_input_length cm_max_key_length
/*
@@ -266,22 +259,9 @@ typedef struct crypto_provider_info {
const crypto_ops_t *pi_ops_vector;
uint_t pi_mech_list_count;
const crypto_mech_info_t *pi_mechanisms;
- uint_t pi_flags;
} crypto_provider_info_t;
/*
- * provider can not do multi-part digest (updates) and has a limit
- * on maximum input data that it can digest.
- */
-#define CRYPTO_HASH_NO_UPDATE 0x00000002
-
-/* provider can handle the request without returning a CRYPTO_QUEUED */
-#define CRYPTO_SYNCHRONOUS 0x00000004
-
-#define CRYPTO_PIFLAGS_RESERVED2 0x40000000
-#define CRYPTO_PIFLAGS_RESERVED1 0x80000000
-
-/*
* Functions exported by Solaris to cryptographic providers. Providers
* call these functions to register and unregister, notify the kernel
* of state changes, and notify the kernel when a asynchronous request
diff --git a/module/icp/spi/kcf_spi.c b/module/icp/spi/kcf_spi.c
index e40291a12..89ecb4e41 100644
--- a/module/icp/spi/kcf_spi.c
+++ b/module/icp/spi/kcf_spi.c
@@ -77,7 +77,6 @@ crypto_register_provider(const crypto_provider_info_t *info,
/* Change from Illumos: the ops vector is persistent. */
prov_desc->pd_ops_vector = info->pi_ops_vector;
- prov_desc->pd_flags = info->pi_flags;
/* process the mechanisms supported by the provider */
if ((ret = init_prov_mechs(info, prov_desc)) != CRYPTO_SUCCESS)
@@ -279,24 +278,6 @@ init_prov_mechs(const crypto_provider_info_t *info, kcf_provider_desc_t *desc)
break;
}
- if (desc->pd_flags & CRYPTO_HASH_NO_UPDATE &&
- mi->cm_func_group_mask & CRYPTO_FG_DIGEST) {
- /*
- * We ask the provider to specify the limit
- * per hash mechanism. But, in practice, a
- * hardware limitation means all hash mechanisms
- * will have the same maximum size allowed for
- * input data. So, we make it a per provider
- * limit to keep it simple.
- */
- if (mi->cm_max_input_length == 0) {
- err = CRYPTO_ARGUMENTS_BAD;
- break;
- } else {
- desc->pd_hash_limit = mi->cm_max_input_length;
- }
- }
-
if ((err = kcf_add_mech_provider(mech_idx, desc, &pmd)) !=
KCF_SUCCESS)
break;