Home
last modified time | relevance | path

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

12

/linux/io_uring/
H A Dtctx.c48 struct io_uring_task *tctx = tsk->io_uring; in io_uring_free_tctx() local
58 if (tctx) { in io_uring_free_tctx()
59 xa_for_each(&tctx->xa, index, node) { in io_uring_free_tctx()
63 WARN_ON_ONCE(tctx->io_wq); in io_uring_free_tctx()
64 WARN_ON_ONCE(tctx->cached_refs); in io_uring_free_tctx()
66 percpu_counter_destroy(&tctx->inflight); in io_uring_free_tctx()
67 kfree(tctx); in io_uring_free_tctx()
85 struct io_uring_task *tctx; in io_uring_alloc_task_context() local
88 tctx = kzalloc_obj(*tctx); in io_uring_alloc_task_context()
89 if (unlikely(!tctx)) in io_uring_alloc_task_context()
[all …]
H A Dcancel.c78 static int io_async_cancel_one(struct io_uring_task *tctx, in io_async_cancel_one() argument
85 if (!tctx || !tctx->io_wq) in io_async_cancel_one()
89 cancel_ret = io_wq_cancel_cb(tctx->io_wq, io_cancel_cb, cd, all); in io_async_cancel_one()
105 int io_try_cancel(struct io_uring_task *tctx, struct io_cancel_data *cd, in io_try_cancel() argument
111 WARN_ON_ONCE(!io_wq_current_is_worker() && tctx != current->io_uring); in io_try_cancel()
113 ret = io_async_cancel_one(tctx, cd); in io_try_cancel()
175 struct io_uring_task *tctx, in __io_async_cancel() argument
184 ret = io_try_cancel(tctx, cd, issue_flags); in __io_async_cancel()
220 struct io_uring_task *tctx = req->tctx; in io_async_cancel() local
239 ret = __io_async_cancel(&cd, tctx, issue_flags); in io_async_cancel()
[all …]
H A Dtw.c33 struct io_uring_task *tctx = container_of(work, struct io_uring_task, in io_tctx_fallback_work() local
42 tctx_task_work_run(tctx, UINT_MAX, &count); in io_tctx_fallback_work()
43 put_task_struct(tctx->task); in io_tctx_fallback_work()
46 static void io_fallback_tw(struct io_uring_task *tctx) in io_fallback_tw() argument
53 get_task_struct(tctx->task); in io_fallback_tw()
54 if (!queue_work(system_dfl_wq, &tctx->fallback_work)) in io_fallback_tw()
55 put_task_struct(tctx->task); in io_fallback_tw()
63 void tctx_task_work_run(struct io_uring_task *tctx, unsigned int max_entries, in tctx_task_work_run() argument
70 struct llist_node *node = mpscq_pop(&tctx->task_list, in tctx_task_work_run()
71 &tctx->task_head); in tctx_task_work_run()
[all …]
H A Dtctx.h14 void io_uring_clean_tctx(struct io_uring_task *tctx);
28 struct io_uring_task *tctx = current->io_uring; in io_uring_add_tctx_node() local
30 if (likely(tctx && tctx->last == ctx)) in io_uring_add_tctx_node()
H A Dsqpoll.c269 struct io_uring_task *tctx = current->io_uring; in io_sq_tw() local
272 tctx_task_work_run(tctx, max_entries, &count); in io_sq_tw()
280 struct io_uring_task *tctx = current->io_uring; in io_sq_tw_pending() local
282 return !mpscq_empty(&tctx->task_list); in io_sq_tw_pending()
456 struct io_uring_task *tctx; in io_sq_offload_create() local
525 tctx = io_uring_alloc_task_context(tsk, ctx); in io_sq_offload_create()
526 if (!IS_ERR(tctx)) in io_sq_offload_create()
527 tsk->io_uring = tctx; in io_sq_offload_create()
529 ret = PTR_ERR(tctx); in io_sq_offload_create()
H A Dfutex.h15 bool io_futex_remove_all(struct io_ring_ctx *ctx, struct io_uring_task *tctx,
27 struct io_uring_task *tctx, bool cancel_all) in io_futex_remove_all() argument
H A Dio_uring.c157 req->tctx = IO_URING_PTR_POISON; in io_poison_cached_req()
324 atomic_dec(&req->tctx->inflight_tracked); in io_clean_op()
343 atomic_inc(&req->tctx->inflight_tracked); in io_req_track_inflight()
412 struct io_uring_task *tctx = req->tctx; in io_queue_iowq() local
414 BUG_ON(!tctx); in io_queue_iowq()
416 if ((current->flags & PF_KTHREAD) || !tctx->io_wq) { in io_queue_iowq()
431 if (WARN_ON_ONCE(!same_thread_group(tctx->task, current))) in io_queue_iowq()
435 io_wq_enqueue(tctx->io_wq, &req->work); in io_queue_iowq()
593 struct io_uring_task *tctx = req->tctx; in io_put_task() local
595 if (likely(tctx->task == current)) { in io_put_task()
[all …]
H A Dio_uring.h197 int io_ring_add_registered_file(struct io_uring_task *tctx, struct file *file,
212 void io_task_refs_refill(struct io_uring_task *tctx);
511 struct io_uring_task *tctx = current->io_uring; in io_get_task_refs() local
513 tctx->cached_refs -= nr; in io_get_task_refs()
514 if (unlikely(tctx->cached_refs < 0)) in io_get_task_refs()
515 io_task_refs_refill(tctx); in io_get_task_refs()
H A Dregister.c357 struct io_uring_task *tctx = NULL; in io_register_iowq_max_workers() local
384 tctx = tsk->io_uring; in io_register_iowq_max_workers()
387 tctx = current->io_uring; in io_register_iowq_max_workers()
397 if (tctx && tctx->io_wq) { in io_register_iowq_max_workers()
398 ret = io_wq_max_workers(tctx->io_wq, new_count); in io_register_iowq_max_workers()
422 tctx = node->task->io_uring; in io_register_iowq_max_workers()
423 if (WARN_ON_ONCE(!tctx->io_wq)) in io_register_iowq_max_workers()
429 (void)io_wq_max_workers(tctx->io_wq, new_count); in io_register_iowq_max_workers()
H A Dtimeout.c388 ret = io_try_cancel(req->tctx, &cd, 0); in io_req_task_link_timeout()
714 static bool io_match_task(struct io_kiocb *head, struct io_uring_task *tctx, in io_match_task() argument
720 if (tctx && head->tctx != tctx) in io_match_task()
733 __cold bool io_kill_timeouts(struct io_ring_ctx *ctx, struct io_uring_task *tctx, in io_kill_timeouts() argument
748 if (io_match_task(req, tctx, cancel_all)) in io_kill_timeouts()
H A During_cmd.h17 struct io_uring_task *tctx, bool cancel_all);
H A Dwaitid.c173 bool io_waitid_remove_all(struct io_ring_ctx *ctx, struct io_uring_task *tctx, in io_waitid_remove_all() argument
176 return io_cancel_remove_all(ctx, tctx, &ctx->waitid_list, cancel_all, __io_waitid_cancel); in io_waitid_remove_all()
317 iwa->wo.child_wait.private = req->tctx->task; in io_waitid()
H A During_cmd.c52 struct io_uring_task *tctx, bool cancel_all) in io_uring_try_cancel_uring_cmd() argument
66 if (!cancel_all && req->tctx != tctx) in io_uring_try_cancel_uring_cmd()
H A Dfutex.c121 bool io_futex_remove_all(struct io_ring_ctx *ctx, struct io_uring_task *tctx, in io_futex_remove_all() argument
124 return io_cancel_remove_all(ctx, tctx, &ctx->futex_list, cancel_all, __io_futex_cancel); in io_futex_remove_all()
H A Dio-wq.c1454 int io_wq_cpu_affinity(struct io_uring_task *tctx, cpumask_var_t mask) in io_wq_cpu_affinity() argument
1459 if (!tctx || !tctx->io_wq) in io_wq_cpu_affinity()
1466 cpuset_cpus_allowed(tctx->io_wq->task, allowed_mask); in io_wq_cpu_affinity()
1469 cpumask_copy(tctx->io_wq->cpu_mask, mask); in io_wq_cpu_affinity()
1473 cpumask_copy(tctx->io_wq->cpu_mask, allowed_mask); in io_wq_cpu_affinity()
/linux/tools/testing/selftests/lsm/
H A Dlsm_get_self_attr_test.c145 struct lsm_ctx *tctx = NULL; in TEST() local
191 tctx = ctx; in TEST()
193 ASSERT_EQ(0, strcmp((char *)tctx->ctx, attr)); in TEST()
195 tctx = next_ctx(tctx); in TEST()
196 ASSERT_NE(0, strcmp((char *)tctx->ctx, attr)); in TEST()
204 tctx = ctx; in TEST()
206 ASSERT_EQ(0, strcmp((char *)tctx->ctx, attr)); in TEST()
209 tctx = next_ctx(tctx); in TEST()
210 ASSERT_NE(0, strcmp((char *)tctx->ctx, attr)); in TEST()
218 tctx = ctx; in TEST()
[all …]
/linux/drivers/crypto/
H A 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 …]
H A Datmel-sha.c404 static struct atmel_sha_dev *atmel_sha_find_dev(struct atmel_sha_ctx *tctx) in atmel_sha_find_dev() argument
409 if (!tctx->dd) in atmel_sha_find_dev()
410 tctx->dd = list_first_entry_or_null(&atmel_sha.dev_list, in atmel_sha_find_dev()
412 dd = tctx->dd; in atmel_sha_find_dev()
421 struct atmel_sha_ctx *tctx = crypto_ahash_ctx(tfm); in atmel_sha_init() local
423 struct atmel_sha_dev *dd = atmel_sha_find_dev(tctx); in atmel_sha_init()
1145 struct atmel_sha_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in atmel_sha_enqueue() local
1146 struct atmel_sha_dev *dd = tctx->dd; in atmel_sha_enqueue()
2163 struct atmel_sha_ctx *tctx; in atmel_sha_authenc_spawn() local
2197 tctx = crypto_ahash_ctx(tfm); in atmel_sha_authenc_spawn()
[all …]
H A Dimg-hash.c629 struct img_hash_ctx *tctx = crypto_ahash_ctx(tfm); in img_hash_digest() local
633 if (!tctx->hdev) in img_hash_digest()
634 tctx->hdev = list_first_entry_or_null(&img_hash.dev_list, in img_hash_digest()
636 ctx->hdev = tctx->hdev; in img_hash_digest()
710 struct img_hash_ctx *tctx = crypto_tfm_ctx(tfm); in img_hash_cra_exit() local
712 crypto_free_ahash(tctx->fallback); in img_hash_cra_exit()
/linux/crypto/
H A 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 …]
H A Dblake2b.c20 struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(tfm); in crypto_blake2b_setkey() local
24 memcpy(tctx->key, key, keylen); in crypto_blake2b_setkey()
25 tctx->keylen = keylen; in crypto_blake2b_setkey()
33 const struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in crypto_blake2b_init() local
37 tctx->key, tctx->keylen); in crypto_blake2b_init()
57 const struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in crypto_blake2b_digest() local
60 blake2b(tctx->key, tctx->keylen, data, len, out, digestsize); in crypto_blake2b_digest()
/linux/tools/testing/selftests/sched_ext/
H A Dselect_cpu_dfl_nodispatch.bpf.c37 struct task_ctx *tctx; in BPF_STRUCT_OPS() local
40 tctx = bpf_task_storage_get(&task_ctx_stor, p, 0, 0); in BPF_STRUCT_OPS()
41 if (!tctx) { in BPF_STRUCT_OPS()
47 &tctx->force_local); in BPF_STRUCT_OPS()
56 struct task_ctx *tctx; in BPF_STRUCT_OPS() local
58 tctx = bpf_task_storage_get(&task_ctx_stor, p, 0, 0); in BPF_STRUCT_OPS()
59 if (!tctx) { in BPF_STRUCT_OPS()
64 if (tctx->force_local) { in BPF_STRUCT_OPS()
66 tctx->force_local = false; in BPF_STRUCT_OPS()
/linux/drivers/crypto/intel/keembay/
H A Dkeembay-ocs-hcu-core.c168 struct ocs_hcu_ctx *tctx = crypto_ahash_ctx(tfm); in kmb_ocs_hcu_find_dev() local
171 if (tctx->hcu_dev) in kmb_ocs_hcu_find_dev()
172 return tctx->hcu_dev; in kmb_ocs_hcu_find_dev()
179 tctx->hcu_dev = list_first_entry_or_null(&ocs_hcu.dev_list, in kmb_ocs_hcu_find_dev()
184 return tctx->hcu_dev; in kmb_ocs_hcu_find_dev()
426 struct ocs_hcu_ctx *tctx = crypto_ahash_ctx(tfm); in kmb_ocs_hcu_do_one_request() local
446 rc = ocs_hcu_hmac(hcu_dev, rctx->algo, tctx->key, tctx->key_len, in kmb_ocs_hcu_do_one_request()
542 WARN_ON(tctx->key_len != rctx->blk_sz); in kmb_ocs_hcu_do_one_request()
544 rctx->buffer[i] = tctx->key[i] ^ HMAC_OPAD_VALUE; in kmb_ocs_hcu_do_one_request()
/linux/include/trace/events/
H A Dio_uring.h603 TP_PROTO(void *tctx, unsigned int count),
605 TP_ARGS(tctx, count),
608 __field( void *, tctx )
613 __entry->tctx = tctx;
617 TP_printk("tctx %p, count %u", __entry->tctx, __entry->count)
/linux/arch/arm64/crypto/
H A Dsm4-ce-glue.c577 struct sm4_mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in sm4_mac_update() local
583 sm4_ce_mac_update(tctx->key.rkey_enc, ctx->digest, p, in sm4_mac_update()
591 struct sm4_mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in sm4_cmac_finup() local
593 const u8 *consts = tctx->consts; in sm4_cmac_finup()
601 sm4_ce_mac_update(tctx->key.rkey_enc, ctx->digest, consts, 1, in sm4_cmac_finup()
610 struct sm4_mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in sm4_cbcmac_finup() local
616 sm4_ce_crypt_block(tctx->key.rkey_enc, ctx->digest, in sm4_cbcmac_finup()

12