mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
module: icp: remove unused p[di]_flags
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12901
This commit is contained in:
parent
d77702035a
commit
f3c3a6d47e
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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,21 +259,8 @@ 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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user