Home
last modified time | relevance | path

Searched refs:tctx (Results 1 – 25 of 35) sorted by relevance

12

/Linux-v6.6/io_uring/
Dtctx.c49 struct io_uring_task *tctx = tsk->io_uring; in __io_uring_free() local
51 WARN_ON_ONCE(!xa_empty(&tctx->xa)); in __io_uring_free()
52 WARN_ON_ONCE(tctx->io_wq); in __io_uring_free()
53 WARN_ON_ONCE(tctx->cached_refs); in __io_uring_free()
55 percpu_counter_destroy(&tctx->inflight); in __io_uring_free()
56 kfree(tctx); in __io_uring_free()
63 struct io_uring_task *tctx; in io_uring_alloc_task_context() local
66 tctx = kzalloc(sizeof(*tctx), GFP_KERNEL); in io_uring_alloc_task_context()
67 if (unlikely(!tctx)) in io_uring_alloc_task_context()
70 ret = percpu_counter_init(&tctx->inflight, 0, GFP_KERNEL); in io_uring_alloc_task_context()
[all …]
Dcancel.c75 static int io_async_cancel_one(struct io_uring_task *tctx, in io_async_cancel_one() argument
82 if (!tctx || !tctx->io_wq) in io_async_cancel_one()
86 cancel_ret = io_wq_cancel_cb(tctx->io_wq, io_cancel_cb, cd, all); in io_async_cancel_one()
102 int io_try_cancel(struct io_uring_task *tctx, struct io_cancel_data *cd, in io_try_cancel() argument
108 WARN_ON_ONCE(!io_wq_current_is_worker() && tctx != current->io_uring); in io_try_cancel()
110 ret = io_async_cancel_one(tctx, cd); in io_try_cancel()
157 struct io_uring_task *tctx, in __io_async_cancel() argument
166 ret = io_try_cancel(tctx, cd, issue_flags); in __io_async_cancel()
178 struct io_uring_task *tctx = node->task->io_uring; in __io_async_cancel() local
180 ret = io_async_cancel_one(tctx, cd); in __io_async_cancel()
[all …]
Dtctx.h14 void io_uring_clean_tctx(struct io_uring_task *tctx);
27 struct io_uring_task *tctx = current->io_uring; in io_uring_add_tctx_node() local
29 if (likely(tctx && tctx->last == ctx)) in io_uring_add_tctx_node()
Dio_uring.c402 struct io_uring_task *tctx = req->task->io_uring; in io_clean_op() local
404 atomic_dec(&tctx->inflight_tracked); in io_clean_op()
509 struct io_uring_task *tctx = req->task->io_uring; in io_queue_iowq() local
511 BUG_ON(!tctx); in io_queue_iowq()
512 BUG_ON(!tctx->io_wq); in io_queue_iowq()
528 io_wq_enqueue(tctx->io_wq, &req->work); in io_queue_iowq()
743 struct io_uring_task *tctx = task->io_uring; in io_put_task_remote() local
745 percpu_counter_sub(&tctx->inflight, 1); in io_put_task_remote()
746 if (unlikely(atomic_read(&tctx->in_cancel))) in io_put_task_remote()
747 wake_up(&tctx->wait); in io_put_task_remote()
[all …]
Dio_uring.h69 int io_ring_add_registered_file(struct io_uring_task *tctx, struct file *file,
83 void io_task_refs_refill(struct io_uring_task *tctx);
333 struct io_uring_task *tctx = current->io_uring; in io_get_task_refs() local
335 tctx->cached_refs -= nr; in io_get_task_refs()
336 if (unlikely(tctx->cached_refs < 0)) in io_get_task_refs()
337 io_task_refs_refill(tctx); in io_get_task_refs()
/Linux-v6.6/drivers/crypto/
Dgeode-aes.c70 geode_aes_crypt(const struct geode_aes_tfm_ctx *tctx, const void *src, in geode_aes_crypt() argument
97 _writefield(AES_WRITEKEY0_REG, tctx->key); in geode_aes_crypt()
113 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_setkey_cip() local
115 tctx->keylen = len; in geode_setkey_cip()
118 memcpy(tctx->key, key, len); in geode_setkey_cip()
129 tctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; in geode_setkey_cip()
130 tctx->fallback.cip->base.crt_flags |= in geode_setkey_cip()
133 return crypto_cipher_setkey(tctx->fallback.cip, key, len); in geode_setkey_cip()
139 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_setkey_skcipher() local
141 tctx->keylen = len; in geode_setkey_skcipher()
[all …]
Domap-sham.c304 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_copy_hash_omap4() local
305 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_copy_hash_omap4()
451 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_write_ctrl_omap4() local
452 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_write_ctrl_omap4()
941 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_init() local
990 if (tctx->flags & BIT(FLAGS_HMAC)) { in omap_sham_init()
992 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_init()
1101 struct omap_sham_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in omap_sham_finish_hmac() local
1102 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_finish_hmac()
1217 struct omap_sham_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in omap_sham_final_shash() local
[all …]
Ds5p-sss.c1488 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in s5p_hash_enqueue() local
1492 return s5p_hash_handle_queue(tctx->dd, req); in s5p_hash_enqueue()
1553 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in s5p_hash_final() local
1555 return crypto_shash_tfm_digest(tctx->fallback, ctx->buffer, in s5p_hash_final()
1599 struct s5p_hash_ctx *tctx = crypto_ahash_ctx(tfm); in s5p_hash_init() local
1601 ctx->dd = tctx->dd; in s5p_hash_init()
1609 dev_dbg(tctx->dd->dev, "init: digest size: %d\n", in s5p_hash_init()
1650 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(tfm); in s5p_hash_cra_init_alg() local
1653 tctx->dd = s5p_dev; in s5p_hash_cra_init_alg()
1655 tctx->fallback = crypto_alloc_shash(alg_name, 0, in s5p_hash_cra_init_alg()
[all …]
/Linux-v6.6/crypto/
Dhctr2.c83 static inline u8 *hctr2_hashed_tweaklen(const struct hctr2_tfm_ctx *tctx, in hctr2_hashed_tweaklen() argument
86 u8 *p = (u8 *)tctx + sizeof(*tctx); in hctr2_hashed_tweaklen()
89 p += crypto_shash_statesize(tctx->polyval); in hctr2_hashed_tweaklen()
93 static inline u8 *hctr2_hashed_tweak(const struct hctr2_tfm_ctx *tctx, in hctr2_hashed_tweak() argument
96 return (u8 *)rctx + tctx->hashed_tweak_offset; in hctr2_hashed_tweak()
109 static int hctr2_hash_tweaklen(struct hctr2_tfm_ctx *tctx, bool has_remainder) in hctr2_hash_tweaklen() argument
115 shash->tfm = tctx->polyval; in hctr2_hash_tweaklen()
126 return crypto_shash_export(shash, hctr2_hashed_tweaklen(tctx, has_remainder)); in hctr2_hash_tweaklen()
132 struct hctr2_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in hctr2_setkey() local
136 crypto_cipher_clear_flags(tctx->blockcipher, CRYPTO_TFM_REQ_MASK); in hctr2_setkey()
[all …]
Dessiv.c69 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in essiv_skcipher_setkey() local
73 crypto_skcipher_clear_flags(tctx->u.skcipher, CRYPTO_TFM_REQ_MASK); in essiv_skcipher_setkey()
74 crypto_skcipher_set_flags(tctx->u.skcipher, in essiv_skcipher_setkey()
77 err = crypto_skcipher_setkey(tctx->u.skcipher, key, keylen); in essiv_skcipher_setkey()
81 err = crypto_shash_tfm_digest(tctx->hash, key, keylen, salt); in essiv_skcipher_setkey()
85 crypto_cipher_clear_flags(tctx->essiv_cipher, CRYPTO_TFM_REQ_MASK); in essiv_skcipher_setkey()
86 crypto_cipher_set_flags(tctx->essiv_cipher, in essiv_skcipher_setkey()
89 return crypto_cipher_setkey(tctx->essiv_cipher, salt, in essiv_skcipher_setkey()
90 crypto_shash_digestsize(tctx->hash)); in essiv_skcipher_setkey()
96 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_setkey() local
[all …]
Dadiantum.c120 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_setkey() local
132 crypto_skcipher_clear_flags(tctx->streamcipher, CRYPTO_TFM_REQ_MASK); in adiantum_setkey()
133 crypto_skcipher_set_flags(tctx->streamcipher, in adiantum_setkey()
136 err = crypto_skcipher_setkey(tctx->streamcipher, key, keylen); in adiantum_setkey()
142 crypto_skcipher_reqsize(tctx->streamcipher), GFP_KERNEL); in adiantum_setkey()
148 skcipher_request_set_tfm(&data->req, tctx->streamcipher); in adiantum_setkey()
160 crypto_cipher_clear_flags(tctx->blockcipher, CRYPTO_TFM_REQ_MASK); in adiantum_setkey()
161 crypto_cipher_set_flags(tctx->blockcipher, in adiantum_setkey()
164 err = crypto_cipher_setkey(tctx->blockcipher, keyp, in adiantum_setkey()
171 poly1305_core_setkey(&tctx->header_hash_key, keyp); in adiantum_setkey()
[all …]
Dvmac.c399 static void vhash_blocks(const struct vmac_tfm_ctx *tctx, in vhash_blocks() argument
403 const u64 *kptr = tctx->nhkey; in vhash_blocks()
404 const u64 pkh = tctx->polykey[0]; in vhash_blocks()
405 const u64 pkl = tctx->polykey[1]; in vhash_blocks()
433 struct vmac_tfm_ctx *tctx = crypto_shash_ctx(tfm); in vmac_setkey() local
442 err = crypto_cipher_setkey(tctx->cipher, key, keylen); in vmac_setkey()
448 for (i = 0; i < ARRAY_SIZE(tctx->nhkey); i += 2) { in vmac_setkey()
449 crypto_cipher_encrypt_one(tctx->cipher, (u8 *)out, in); in vmac_setkey()
450 tctx->nhkey[i] = be64_to_cpu(out[0]); in vmac_setkey()
451 tctx->nhkey[i+1] = be64_to_cpu(out[1]); in vmac_setkey()
[all …]
Dxxhash_generic.c23 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(tfm); in xxhash64_setkey() local
25 if (keylen != sizeof(tctx->seed)) in xxhash64_setkey()
27 tctx->seed = get_unaligned_le64(key); in xxhash64_setkey()
33 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in xxhash64_init() local
36 xxh64_reset(&dctx->xxhstate, tctx->seed); in xxhash64_init()
63 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in xxhash64_digest() local
65 put_unaligned_le64(xxh64(data, length, tctx->seed), out); in xxhash64_digest()
Dxcbc.c90 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_update() local
92 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_update()
136 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_final() local
138 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_final()
140 u8 *consts = PTR_ALIGN(&tctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
Dcmac.c123 struct cmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cmac_digest_update() local
125 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_update()
169 struct cmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cmac_digest_final() local
171 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_final()
173 u8 *consts = PTR_ALIGN((void *)tctx->ctx, in crypto_cmac_digest_final()
/Linux-v6.6/drivers/crypto/intel/keembay/
Dkeembay-ocs-aes-core.c119 static struct ocs_aes_dev *kmb_ocs_aes_find_dev(struct ocs_aes_tctx *tctx) in kmb_ocs_aes_find_dev() argument
125 if (tctx->aes_dev) { in kmb_ocs_aes_find_dev()
126 aes_dev = tctx->aes_dev; in kmb_ocs_aes_find_dev()
132 tctx->aes_dev = aes_dev; in kmb_ocs_aes_find_dev()
165 static int save_key(struct ocs_aes_tctx *tctx, const u8 *in_key, size_t key_len, in save_key() argument
174 memcpy(tctx->key, in_key, key_len); in save_key()
175 tctx->key_len = key_len; in save_key()
176 tctx->cipher = cipher; in save_key()
185 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); in kmb_ocs_sk_set_key() local
188 tctx->use_fallback = (cipher == OCS_AES && in kmb_ocs_sk_set_key()
[all …]
Dkeembay-ocs-ecc.c203 static struct ocs_ecc_dev *kmb_ocs_ecc_find_dev(struct ocs_ecc_ctx *tctx) in kmb_ocs_ecc_find_dev() argument
205 if (tctx->ecc_dev) in kmb_ocs_ecc_find_dev()
206 return tctx->ecc_dev; in kmb_ocs_ecc_find_dev()
211 tctx->ecc_dev = list_first_entry(&ocs_ecc.dev_list, struct ocs_ecc_dev, in kmb_ocs_ecc_find_dev()
216 return tctx->ecc_dev; in kmb_ocs_ecc_find_dev()
538 struct ocs_ecc_ctx *tctx = kpp_tfm_ctx(tfm); in kmb_ocs_ecdh_set_secret() local
547 if (params.key_size > digits_to_bytes(tctx->curve->g.ndigits)) { in kmb_ocs_ecdh_set_secret()
554 rc = kmb_ecc_gen_privkey(tctx->curve, tctx->private_key); in kmb_ocs_ecdh_set_secret()
558 rc = kmb_ecc_is_key_valid(tctx->curve, (const u64 *)params.key, in kmb_ocs_ecdh_set_secret()
563 ecc_swap_digits((const u64 *)params.key, tctx->private_key, in kmb_ocs_ecdh_set_secret()
[all …]
Dkeembay-ocs-hcu-core.c167 struct ocs_hcu_ctx *tctx = crypto_ahash_ctx(tfm); in kmb_ocs_hcu_find_dev() local
170 if (tctx->hcu_dev) in kmb_ocs_hcu_find_dev()
171 return tctx->hcu_dev; in kmb_ocs_hcu_find_dev()
178 tctx->hcu_dev = list_first_entry_or_null(&ocs_hcu.dev_list, in kmb_ocs_hcu_find_dev()
183 return tctx->hcu_dev; in kmb_ocs_hcu_find_dev()
418 struct ocs_hcu_ctx *tctx = crypto_ahash_ctx(tfm); in kmb_ocs_hcu_do_one_request() local
438 rc = ocs_hcu_hmac(hcu_dev, rctx->algo, tctx->key, tctx->key_len, in kmb_ocs_hcu_do_one_request()
534 WARN_ON(tctx->key_len != rctx->blk_sz); in kmb_ocs_hcu_do_one_request()
536 rctx->buffer[i] = tctx->key[i] ^ HMAC_OPAD_VALUE; in kmb_ocs_hcu_do_one_request()
/Linux-v6.6/arch/arm64/crypto/
Dpolyval-ce-glue.c75 struct polyval_tfm_ctx *tctx = crypto_shash_ctx(tfm); in polyval_arm64_setkey() local
81 memcpy(tctx->key_powers[NUM_KEY_POWERS-1], key, POLYVAL_BLOCK_SIZE); in polyval_arm64_setkey()
84 memcpy(tctx->key_powers[i], key, POLYVAL_BLOCK_SIZE); in polyval_arm64_setkey()
85 internal_polyval_mul(tctx->key_powers[i], in polyval_arm64_setkey()
86 tctx->key_powers[i+1]); in polyval_arm64_setkey()
105 const struct polyval_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in polyval_arm64_update() local
122 tctx->key_powers[NUM_KEY_POWERS-1]); in polyval_arm64_update()
128 internal_polyval_update(tctx, src, nblocks, dctx->buffer); in polyval_arm64_update()
146 const struct polyval_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in polyval_arm64_final() local
150 tctx->key_powers[NUM_KEY_POWERS-1]); in polyval_arm64_final()
/Linux-v6.6/arch/x86/crypto/
Dpolyval-clmulni_glue.c84 struct polyval_tfm_ctx *tctx = polyval_tfm_ctx(tfm); in polyval_x86_setkey() local
90 memcpy(tctx->key_powers[NUM_KEY_POWERS-1], key, POLYVAL_BLOCK_SIZE); in polyval_x86_setkey()
93 memcpy(tctx->key_powers[i], key, POLYVAL_BLOCK_SIZE); in polyval_x86_setkey()
94 internal_polyval_mul(tctx->key_powers[i], in polyval_x86_setkey()
95 tctx->key_powers[i+1]); in polyval_x86_setkey()
114 const struct polyval_tfm_ctx *tctx = polyval_tfm_ctx(desc->tfm); in polyval_x86_update() local
131 tctx->key_powers[NUM_KEY_POWERS-1]); in polyval_x86_update()
137 internal_polyval_update(tctx, src, nblocks, dctx->buffer); in polyval_x86_update()
155 const struct polyval_tfm_ctx *tctx = polyval_tfm_ctx(desc->tfm); in polyval_x86_final() local
159 tctx->key_powers[NUM_KEY_POWERS-1]); in polyval_x86_final()
/Linux-v6.6/include/crypto/internal/
Dblake2b.h75 struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(tfm); in crypto_blake2b_setkey() local
80 memcpy(tctx->key, key, keylen); in crypto_blake2b_setkey()
81 tctx->keylen = keylen; in crypto_blake2b_setkey()
88 const struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in crypto_blake2b_init() local
92 __blake2b_init(state, outlen, tctx->key, tctx->keylen); in crypto_blake2b_init()
/Linux-v6.6/drivers/crypto/aspeed/
Daspeed-hace-hash.c352 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); in aspeed_ahash_hmac_resume() local
353 struct aspeed_sha_hmac_ctx *bctx = tctx->base; in aspeed_ahash_hmac_resume()
538 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); in aspeed_ahash_do_request() local
539 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; in aspeed_ahash_do_request()
562 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); in aspeed_ahash_prepare_request() local
563 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; in aspeed_ahash_prepare_request()
585 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); in aspeed_sham_update() local
586 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; in aspeed_sham_update()
626 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); in aspeed_sham_final() local
627 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; in aspeed_sham_final()
[all …]
/Linux-v6.6/drivers/crypto/rockchip/
Drk3288_crypto_ahash.c346 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_hash_init_tfm() local
352 tctx->fallback_tfm = crypto_alloc_ahash(alg_name, 0, in rk_hash_init_tfm()
354 if (IS_ERR(tctx->fallback_tfm)) { in rk_hash_init_tfm()
356 return PTR_ERR(tctx->fallback_tfm); in rk_hash_init_tfm()
361 crypto_ahash_reqsize(tctx->fallback_tfm)); in rk_hash_init_tfm()
368 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_hash_exit_tfm() local
370 crypto_free_ahash(tctx->fallback_tfm); in rk_hash_exit_tfm()
/Linux-v6.6/drivers/crypto/xilinx/
Dzynqmp-sha.c84 struct zynqmp_sha_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in zynqmp_sha_init() local
86 dctx->fbk_req.tfm = tctx->fbk_tfm; in zynqmp_sha_init()
114 struct zynqmp_sha_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in zynqmp_sha_import() local
116 dctx->fbk_req.tfm = tctx->fbk_tfm; in zynqmp_sha_import()
/Linux-v6.6/include/trace/events/
Dio_uring.h610 TP_PROTO(void *tctx, unsigned int count, unsigned int loops),
612 TP_ARGS(tctx, count, loops),
615 __field( void *, tctx )
621 __entry->tctx = tctx;
627 __entry->tctx, __entry->count, __entry->loops)

12