Home
last modified time | relevance | path

Searched refs:blk_key (Results 1 – 6 of 6) sorted by relevance

/linux/fs/crypto/
H A Dinline_crypt.c166 struct blk_crypto_key *blk_key; in fscrypt_prepare_inline_crypt_key() local
172 blk_key = kmalloc(sizeof(*blk_key), GFP_KERNEL); in fscrypt_prepare_inline_crypt_key()
173 if (!blk_key) in fscrypt_prepare_inline_crypt_key()
176 err = blk_crypto_init_key(blk_key, key_bytes, key_size, key_type, in fscrypt_prepare_inline_crypt_key()
191 err = blk_crypto_start_using_key(devs[i], blk_key); in fscrypt_prepare_inline_crypt_key()
207 smp_store_release(&prep_key->blk_key, blk_key); in fscrypt_prepare_inline_crypt_key()
211 kfree_sensitive(blk_key); in fscrypt_prepare_inline_crypt_key()
218 struct blk_crypto_key *blk_key = prep_key->blk_key; in fscrypt_destroy_inline_crypt_key() local
223 if (!blk_key) in fscrypt_destroy_inline_crypt_key()
230 blk_crypto_evict_key(devs[i], blk_key); in fscrypt_destroy_inline_crypt_key()
[all …]
H A Dfscrypt_private.h244 struct blk_crypto_key *blk_key; member
454 return smp_load_acquire(&prep_key->blk_key) != NULL; in fscrypt_is_key_prepared()
/linux/block/
H A Dblk-crypto.c339 int blk_crypto_init_key(struct blk_crypto_key *blk_key, in blk_crypto_init_key() argument
348 memset(blk_key, 0, sizeof(*blk_key)); in blk_crypto_init_key()
374 blk_key->crypto_cfg.crypto_mode = crypto_mode; in blk_crypto_init_key()
375 blk_key->crypto_cfg.dun_bytes = dun_bytes; in blk_crypto_init_key()
376 blk_key->crypto_cfg.data_unit_size = data_unit_size; in blk_crypto_init_key()
377 blk_key->crypto_cfg.key_type = key_type; in blk_crypto_init_key()
378 blk_key->data_unit_size_bits = ilog2(data_unit_size); in blk_crypto_init_key()
379 blk_key->size = key_size; in blk_crypto_init_key()
380 memcpy(blk_key->bytes, key_bytes, key_size); in blk_crypto_init_key()
/linux/drivers/soc/qcom/
H A Dice.c344 const struct blk_crypto_key *blk_key) in qcom_ice_program_key() argument
355 if (blk_key->crypto_cfg.crypto_mode != in qcom_ice_program_key()
358 blk_key->crypto_cfg.crypto_mode); in qcom_ice_program_key()
362 if (blk_key->crypto_cfg.key_type == BLK_CRYPTO_KEY_TYPE_HW_WRAPPED) in qcom_ice_program_key()
363 return qcom_ice_program_wrapped_key(ice, slot, blk_key); in qcom_ice_program_key()
370 if (blk_key->size != AES_256_XTS_KEY_SIZE) { in qcom_ice_program_key()
374 memcpy(key.bytes, blk_key->bytes, AES_256_XTS_KEY_SIZE); in qcom_ice_program_key()
382 blk_key->crypto_cfg.data_unit_size / 512); in qcom_ice_program_key()
/linux/include/soc/qcom/
H A Dice.h18 const struct blk_crypto_key *blk_key);
/linux/include/linux/
H A Dblk-crypto.h143 int blk_crypto_init_key(struct blk_crypto_key *blk_key,