Home
last modified time | relevance | path

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

/kernel/linux/linux-5.10/fs/crypto/
Dinline_crypt.c135 struct fscrypt_blk_crypto_key *blk_key; in fscrypt_prepare_inline_crypt_key() local
139 blk_key = kzalloc(struct_size(blk_key, devs, num_devs), GFP_KERNEL); in fscrypt_prepare_inline_crypt_key()
140 if (!blk_key) in fscrypt_prepare_inline_crypt_key()
143 blk_key->num_devs = num_devs; in fscrypt_prepare_inline_crypt_key()
144 fscrypt_get_devices(sb, num_devs, blk_key->devs); in fscrypt_prepare_inline_crypt_key()
146 err = blk_crypto_init_key(&blk_key->base, raw_key, crypto_mode, in fscrypt_prepare_inline_crypt_key()
161 if (!blk_get_queue(blk_key->devs[i])) { in fscrypt_prepare_inline_crypt_key()
168 err = blk_crypto_start_using_key(&blk_key->base, in fscrypt_prepare_inline_crypt_key()
169 blk_key->devs[i]); in fscrypt_prepare_inline_crypt_key()
182 smp_store_release(&prep_key->blk_key, blk_key); in fscrypt_prepare_inline_crypt_key()
[all …]
Dfscrypt_private.h182 struct fscrypt_blk_crypto_key *blk_key; member
365 return smp_load_acquire(&prep_key->blk_key) != NULL; in fscrypt_is_key_prepared()
/kernel/linux/linux-5.10/drivers/hyperhold/
Dhp_device.c161 void inline_crypt_bio(struct blk_crypto_key *blk_key, struct bio *bio) in inline_crypt_bio() argument
168 bio_crypt_set_ctx(bio, blk_key, iv.dun, GFP_NOIO); in inline_crypt_bio()
173 struct blk_crypto_key *blk_key = NULL; in inline_crypto_init() local
177 blk_key = kzalloc(sizeof(struct blk_crypto_key), GFP_KERNEL); in inline_crypto_init()
178 if (!blk_key) { in inline_crypto_init()
182 ret = blk_crypto_init_key(blk_key, key, HP_CIPHER_MODE, dun_bytes, PAGE_SIZE); in inline_crypto_init()
188 return blk_key; in inline_crypto_init()
190 if (blk_key) in inline_crypto_init()
191 kfree_sensitive(blk_key); in inline_crypto_init()
196 void inline_crypt_bio(struct blk_crypto_key *blk_key, struct bio *bio) {} in inline_crypt_bio() argument
[all …]
Dhp_device.h28 struct blk_crypto_key *blk_key; member
37 void inline_crypt_bio(struct blk_crypto_key *blk_key, struct bio *bio);
Dhp_core.c738 if (dev->blk_key) in hpio_submit()
739 inline_crypt_bio(dev->blk_key, bio); in hpio_submit()
/kernel/linux/linux-6.6/drivers/hyperhold/
Dhp_device.c167 void inline_crypt_bio(struct blk_crypto_key *blk_key, struct bio *bio) in inline_crypt_bio() argument
174 bio_crypt_set_ctx(bio, blk_key, iv.dun, GFP_NOIO); in inline_crypt_bio()
179 struct blk_crypto_key *blk_key = NULL; in inline_crypto_init() local
183 blk_key = kzalloc(sizeof(struct blk_crypto_key), GFP_KERNEL); in inline_crypto_init()
184 if (!blk_key) { in inline_crypto_init()
188 ret = blk_crypto_init_key(blk_key, key, HP_CIPHER_MODE, dun_bytes, PAGE_SIZE); in inline_crypto_init()
194 return blk_key; in inline_crypto_init()
196 if (blk_key) in inline_crypto_init()
197 kfree_sensitive(blk_key); in inline_crypto_init()
202 void inline_crypt_bio(struct blk_crypto_key *blk_key, struct bio *bio) {} in inline_crypt_bio() argument
[all …]
Dhp_device.h28 struct blk_crypto_key *blk_key; member
37 void inline_crypt_bio(struct blk_crypto_key *blk_key, struct bio *bio);
Dhp_core.c788 if (dev->blk_key) in hpio_submit()
789 inline_crypt_bio(dev->blk_key, bio); in hpio_submit()
/kernel/linux/linux-6.6/fs/crypto/
Dinline_crypt.c160 struct blk_crypto_key *blk_key; in fscrypt_prepare_inline_crypt_key() local
166 blk_key = kmalloc(sizeof(*blk_key), GFP_KERNEL); in fscrypt_prepare_inline_crypt_key()
167 if (!blk_key) in fscrypt_prepare_inline_crypt_key()
170 err = blk_crypto_init_key(blk_key, raw_key, crypto_mode, in fscrypt_prepare_inline_crypt_key()
184 err = blk_crypto_start_using_key(devs[i], blk_key); in fscrypt_prepare_inline_crypt_key()
200 smp_store_release(&prep_key->blk_key, blk_key); in fscrypt_prepare_inline_crypt_key()
204 kfree_sensitive(blk_key); in fscrypt_prepare_inline_crypt_key()
211 struct blk_crypto_key *blk_key = prep_key->blk_key; in fscrypt_destroy_inline_crypt_key() local
216 if (!blk_key) in fscrypt_destroy_inline_crypt_key()
223 blk_crypto_evict_key(devs[i], blk_key); in fscrypt_destroy_inline_crypt_key()
[all …]
Dfscrypt_private.h187 struct blk_crypto_key *blk_key; member
367 return smp_load_acquire(&prep_key->blk_key) != NULL; in fscrypt_is_key_prepared()
/kernel/linux/linux-5.10/block/
Dblk-crypto.c320 int blk_crypto_init_key(struct blk_crypto_key *blk_key, const u8 *raw_key, in blk_crypto_init_key() argument
327 memset(blk_key, 0, sizeof(*blk_key)); in blk_crypto_init_key()
342 blk_key->crypto_cfg.crypto_mode = crypto_mode; in blk_crypto_init_key()
343 blk_key->crypto_cfg.dun_bytes = dun_bytes; in blk_crypto_init_key()
344 blk_key->crypto_cfg.data_unit_size = data_unit_size; in blk_crypto_init_key()
345 blk_key->data_unit_size_bits = ilog2(data_unit_size); in blk_crypto_init_key()
346 blk_key->size = mode->keysize; in blk_crypto_init_key()
347 memcpy(blk_key->raw, raw_key, mode->keysize); in blk_crypto_init_key()
/kernel/linux/linux-6.6/block/
Dblk-crypto.c328 int blk_crypto_init_key(struct blk_crypto_key *blk_key, const u8 *raw_key, in blk_crypto_init_key() argument
335 memset(blk_key, 0, sizeof(*blk_key)); in blk_crypto_init_key()
350 blk_key->crypto_cfg.crypto_mode = crypto_mode; in blk_crypto_init_key()
351 blk_key->crypto_cfg.dun_bytes = dun_bytes; in blk_crypto_init_key()
352 blk_key->crypto_cfg.data_unit_size = data_unit_size; in blk_crypto_init_key()
353 blk_key->data_unit_size_bits = ilog2(data_unit_size); in blk_crypto_init_key()
354 blk_key->size = mode->keysize; in blk_crypto_init_key()
355 memcpy(blk_key->raw, raw_key, mode->keysize); in blk_crypto_init_key()
/kernel/linux/linux-5.10/include/linux/
Dblk-crypto.h92 int blk_crypto_init_key(struct blk_crypto_key *blk_key, const u8 *raw_key,
/kernel/linux/linux-6.6/include/linux/
Dblk-crypto.h90 int blk_crypto_init_key(struct blk_crypto_key *blk_key, const u8 *raw_key,