Lines Matching refs:profile
1156 struct blk_crypto_profile profile; member
1173 static int dm_keyslot_evict(struct blk_crypto_profile *profile, in dm_keyslot_evict() argument
1177 container_of(profile, struct dm_crypto_profile, profile)->md; in dm_keyslot_evict()
1236 struct blk_crypto_profile *profile = in dm_wrappedkey_op_callback() local
1252 err = blk_crypto_import_key(profile, in dm_wrappedkey_op_callback()
1258 err = blk_crypto_generate_key(profile, in dm_wrappedkey_op_callback()
1262 err = blk_crypto_prepare_key(profile, in dm_wrappedkey_op_callback()
1274 static int dm_exec_wrappedkey_op(struct blk_crypto_profile *profile, in dm_exec_wrappedkey_op() argument
1278 container_of(profile, struct dm_crypto_profile, profile)->md; in dm_exec_wrappedkey_op()
1312 static int dm_derive_sw_secret(struct blk_crypto_profile *profile, in dm_derive_sw_secret() argument
1324 return dm_exec_wrappedkey_op(profile, &args); in dm_derive_sw_secret()
1327 static int dm_import_key(struct blk_crypto_profile *profile, in dm_import_key() argument
1339 return dm_exec_wrappedkey_op(profile, &args); in dm_import_key()
1342 static int dm_generate_key(struct blk_crypto_profile *profile, in dm_generate_key() argument
1351 return dm_exec_wrappedkey_op(profile, &args); in dm_generate_key()
1354 static int dm_prepare_key(struct blk_crypto_profile *profile, in dm_prepare_key() argument
1366 return dm_exec_wrappedkey_op(profile, &args); in dm_prepare_key()
1381 void dm_destroy_crypto_profile(struct blk_crypto_profile *profile) in dm_destroy_crypto_profile() argument
1383 struct dm_crypto_profile *dmcp = container_of(profile, in dm_destroy_crypto_profile()
1385 profile); in dm_destroy_crypto_profile()
1387 if (!profile) in dm_destroy_crypto_profile()
1390 blk_crypto_profile_destroy(profile); in dm_destroy_crypto_profile()
1412 struct blk_crypto_profile *profile; in dm_table_construct_crypto_profile() local
1421 profile = &dmcp->profile; in dm_table_construct_crypto_profile()
1422 blk_crypto_profile_init(profile, 0); in dm_table_construct_crypto_profile()
1423 profile->ll_ops.keyslot_evict = dm_keyslot_evict; in dm_table_construct_crypto_profile()
1424 profile->max_dun_bytes_supported = UINT_MAX; in dm_table_construct_crypto_profile()
1425 memset(profile->modes_supported, 0xFF, in dm_table_construct_crypto_profile()
1426 sizeof(profile->modes_supported)); in dm_table_construct_crypto_profile()
1427 profile->key_types_supported = ~0; in dm_table_construct_crypto_profile()
1433 blk_crypto_intersect_capabilities(profile, NULL); in dm_table_construct_crypto_profile()
1440 profile); in dm_table_construct_crypto_profile()
1443 if (profile->key_types_supported & BLK_CRYPTO_KEY_TYPE_HW_WRAPPED) { in dm_table_construct_crypto_profile()
1444 profile->ll_ops.derive_sw_secret = dm_derive_sw_secret; in dm_table_construct_crypto_profile()
1445 profile->ll_ops.import_key = dm_import_key; in dm_table_construct_crypto_profile()
1446 profile->ll_ops.generate_key = dm_generate_key; in dm_table_construct_crypto_profile()
1447 profile->ll_ops.prepare_key = dm_prepare_key; in dm_table_construct_crypto_profile()
1451 !blk_crypto_has_capabilities(profile, in dm_table_construct_crypto_profile()
1454 dm_destroy_crypto_profile(profile); in dm_table_construct_crypto_profile()
1462 for (i = 0; i < ARRAY_SIZE(profile->modes_supported); i++) { in dm_table_construct_crypto_profile()
1463 if (profile->modes_supported[i]) { in dm_table_construct_crypto_profile()
1470 dm_destroy_crypto_profile(profile); in dm_table_construct_crypto_profile()
1471 profile = NULL; in dm_table_construct_crypto_profile()
1479 t->crypto_profile = profile; in dm_table_construct_crypto_profile()
1508 void dm_destroy_crypto_profile(struct blk_crypto_profile *profile) in dm_destroy_crypto_profile() argument