| /linux/io_uring/ |
| H A D | tctx.c | 48 struct io_uring_task *tctx = tsk->io_uring; in __io_uring_free() local 58 if (tctx) { in __io_uring_free() 59 xa_for_each(&tctx->xa, index, node) { in __io_uring_free() 63 WARN_ON_ONCE(tctx->io_wq); in __io_uring_free() 64 WARN_ON_ONCE(tctx->cached_refs); in __io_uring_free() 66 percpu_counter_destroy(&tctx->inflight); in __io_uring_free() 67 kfree(tctx); in __io_uring_free() 80 struct io_uring_task *tctx; in io_uring_alloc_task_context() local 83 tctx = kzalloc_obj(*tctx); in io_uring_alloc_task_context() 84 if (unlikely(!tctx)) in io_uring_alloc_task_context() [all …]
|
| H A D | cancel.c | 78 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() 168 struct io_uring_task *tctx, in __io_async_cancel() argument 177 ret = io_try_cancel(tctx, cd, issue_flags); in __io_async_cancel() 213 struct io_uring_task *tctx = req->tctx; in io_async_cancel() local 232 ret = __io_async_cancel(&cd, tctx, issue_flags); in io_async_cancel() [all …]
|
| H A D | tctx.h | 14 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()
|
| H A D | register.c | 349 struct io_uring_task *tctx = NULL; in io_register_iowq_max_workers() local 376 tctx = tsk->io_uring; in io_register_iowq_max_workers() 379 tctx = current->io_uring; in io_register_iowq_max_workers() 389 if (tctx && tctx->io_wq) { in io_register_iowq_max_workers() 390 ret = io_wq_max_workers(tctx->io_wq, new_count); in io_register_iowq_max_workers() 414 tctx = node->task->io_uring; in io_register_iowq_max_workers() 415 if (WARN_ON_ONCE(!tctx->io_wq)) in io_register_iowq_max_workers() 421 (void)io_wq_max_workers(tctx->io_wq, new_count); in io_register_iowq_max_workers() 944 struct io_uring_task *tctx = current->io_uring; in io_uring_register_get_file() local 946 if (unlikely(!tctx || fd >= IO_RINGFD_REG_MAX)) in io_uring_register_get_file() [all …]
|
| H A D | io_uring.c | 154 req->tctx = IO_URING_PTR_POISON; in io_poison_cached_req() 319 atomic_dec(&req->tctx->inflight_tracked); in io_clean_op() 338 atomic_inc(&req->tctx->inflight_tracked); in io_req_track_inflight() 408 struct io_uring_task *tctx = req->tctx; in io_queue_iowq() local 410 BUG_ON(!tctx); in io_queue_iowq() 412 if ((current->flags & PF_KTHREAD) || !tctx->io_wq) { in io_queue_iowq() 427 if (WARN_ON_ONCE(!same_thread_group(tctx->task, current))) in io_queue_iowq() 431 io_wq_enqueue(tctx->io_wq, &req->work); in io_queue_iowq() 595 struct io_uring_task *tctx = req->tctx; in io_put_task() local 597 if (likely(tctx->task == current)) { in io_put_task() [all …]
|
| H A D | cancel.h | 19 int io_try_cancel(struct io_uring_task *tctx, struct io_cancel_data *cd, 24 bool io_match_task_safe(struct io_kiocb *head, struct io_uring_task *tctx, 27 bool io_cancel_remove_all(struct io_ring_ctx *ctx, struct io_uring_task *tctx, 34 struct io_uring_task *tctx,
|
| H A D | io_uring.h | 183 int io_ring_add_registered_file(struct io_uring_task *tctx, struct file *file, 198 void io_task_refs_refill(struct io_uring_task *tctx); 482 struct io_uring_task *tctx = current->io_uring; in io_get_task_refs() local 484 tctx->cached_refs -= nr; in io_get_task_refs() 485 if (unlikely(tctx->cached_refs < 0)) in io_get_task_refs() 486 io_task_refs_refill(tctx); in io_get_task_refs()
|
| H A D | waitid.c | 173 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() 316 iwa->wo.child_wait.private = req->tctx->task; in io_waitid()
|
| H A D | sqpoll.c | 270 struct io_uring_task *tctx = current->io_uring; in io_sq_tw() local 279 *retry_list = tctx_task_work_run(tctx, max_entries, &count); in io_sq_tw() 288 struct io_uring_task *tctx = current->io_uring; in io_sq_tw_pending() local 290 return retry_list || !llist_empty(&tctx->task_list); in io_sq_tw_pending()
|
| H A D | uring_cmd.h | 17 struct io_uring_task *tctx, bool cancel_all);
|
| H A D | poll.h | 46 bool io_poll_remove_all(struct io_ring_ctx *ctx, struct io_uring_task *tctx,
|
| H A D | io-wq.h | 50 int io_wq_cpu_affinity(struct io_uring_task *tctx, cpumask_var_t mask);
|
| H A D | io-wq.c | 1445 int io_wq_cpu_affinity(struct io_uring_task *tctx, cpumask_var_t mask) in io_wq_cpu_affinity() argument 1450 if (!tctx || !tctx->io_wq) in io_wq_cpu_affinity() 1457 cpuset_cpus_allowed(tctx->io_wq->task, allowed_mask); in io_wq_cpu_affinity() 1460 cpumask_copy(tctx->io_wq->cpu_mask, mask); in io_wq_cpu_affinity() 1464 cpumask_copy(tctx->io_wq->cpu_mask, allowed_mask); in io_wq_cpu_affinity()
|
| /linux/tools/testing/selftests/lsm/ |
| H A D | lsm_get_self_attr_test.c | 145 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 D | geode-aes.c | 70 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 D | omap-sham.c | 306 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_copy_hash_omap4() local 307 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_copy_hash_omap4() 453 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_write_ctrl_omap4() local 454 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_write_ctrl_omap4() 943 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_init() local 992 if (tctx->flags & BIT(FLAGS_HMAC)) { in omap_sham_init() 994 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_init() 1103 struct omap_sham_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in omap_sham_finish_hmac() local 1104 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_finish_hmac() 1218 struct omap_sham_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in omap_sham_final_shash() local [all …]
|
| H A D | s5p-sss.c | 1467 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in s5p_hash_enqueue() local 1471 return s5p_hash_handle_queue(tctx->dd, req); in s5p_hash_enqueue() 1532 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in s5p_hash_final() local 1534 return crypto_shash_tfm_digest(tctx->fallback, ctx->buffer, in s5p_hash_final() 1578 struct s5p_hash_ctx *tctx = crypto_ahash_ctx(tfm); in s5p_hash_init() local 1580 ctx->dd = tctx->dd; in s5p_hash_init() 1588 dev_dbg(tctx->dd->dev, "init: digest size: %d\n", in s5p_hash_init() 1629 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(tfm); in s5p_hash_cra_init_alg() local 1632 tctx->dd = s5p_dev; in s5p_hash_cra_init_alg() 1634 tctx->fallback = crypto_alloc_shash(alg_name, 0, in s5p_hash_cra_init_alg() [all …]
|
| H A D | atmel-sha.c | 405 static struct atmel_sha_dev *atmel_sha_find_dev(struct atmel_sha_ctx *tctx) in atmel_sha_find_dev() argument 411 if (!tctx->dd) { in atmel_sha_find_dev() 416 tctx->dd = dd; in atmel_sha_find_dev() 418 dd = tctx->dd; in atmel_sha_find_dev() 429 struct atmel_sha_ctx *tctx = crypto_ahash_ctx(tfm); in atmel_sha_init() local 431 struct atmel_sha_dev *dd = atmel_sha_find_dev(tctx); in atmel_sha_init() 1153 struct atmel_sha_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in atmel_sha_enqueue() local 1154 struct atmel_sha_dev *dd = tctx->dd; in atmel_sha_enqueue() 2172 struct atmel_sha_ctx *tctx; in atmel_sha_authenc_spawn() local 2206 tctx = crypto_ahash_ctx(tfm); in atmel_sha_authenc_spawn() [all …]
|
| /linux/crypto/ |
| H A D | essiv.c | 69 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 D | hctr2.c | 77 static void hctr2_hash_tweaklens(struct hctr2_tfm_ctx *tctx) in hctr2_hash_tweaklens() argument 86 polyval_init(&ctx, &tctx->poly_key); in hctr2_hash_tweaklens() 91 &ctx, &tctx->hashed_tweaklens[has_remainder]); in hctr2_hash_tweaklens() 99 struct hctr2_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in hctr2_setkey() local 103 crypto_cipher_clear_flags(tctx->blockcipher, CRYPTO_TFM_REQ_MASK); in hctr2_setkey() 104 crypto_cipher_set_flags(tctx->blockcipher, in hctr2_setkey() 107 err = crypto_cipher_setkey(tctx->blockcipher, key, keylen); in hctr2_setkey() 111 crypto_skcipher_clear_flags(tctx->xctr, CRYPTO_TFM_REQ_MASK); in hctr2_setkey() 112 crypto_skcipher_set_flags(tctx->xctr, in hctr2_setkey() 115 err = crypto_skcipher_setkey(tctx->xctr, key, keylen); in hctr2_setkey() [all …]
|
| H A D | blake2b.c | 20 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 D | select_cpu_dfl_nodispatch.bpf.c | 37 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/tools/sched_ext/ |
| H A D | scx_qmap.bpf.c | 153 struct task_ctx *tctx; in lookup_task_ctx() local 155 if (!(tctx = bpf_task_storage_get(&task_ctx_stor, p, 0, 0))) { in lookup_task_ctx() 159 return tctx; in lookup_task_ctx() 165 struct task_ctx *tctx; in BPF_STRUCT_OPS() local 168 if (!(tctx = lookup_task_ctx(p))) in BPF_STRUCT_OPS() 174 tctx->force_local = true; in BPF_STRUCT_OPS() 199 struct task_ctx *tctx; in BPF_STRUCT_OPS() local 219 if (!(tctx = lookup_task_ctx(p))) in BPF_STRUCT_OPS() 226 tctx->core_sched_seq = core_sched_tail_seqs[idx]++; in BPF_STRUCT_OPS() 232 if (tctx in BPF_STRUCT_OPS() 295 struct task_ctx *tctx; update_core_sched_head_seq() local 319 struct task_ctx *tctx; dispatch_highpri() local 370 struct task_ctx *tctx; BPF_STRUCT_OPS() local 415 struct task_ctx *tctx; BPF_STRUCT_OPS() local 499 struct task_ctx *tctx; task_qdist() local [all...] |
| /linux/include/trace/events/ |
| H A D | io_uring.h | 603 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 D | sm4-ce-glue.c | 577 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()
|