Home
last modified time | relevance | path

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

12

/linux/io_uring/
A Dtctx.c56 kfree(tctx); in __io_uring_free()
66 tctx = kzalloc(sizeof(*tctx), GFP_KERNEL); in io_uring_alloc_task_context()
67 if (unlikely(!tctx)) in io_uring_alloc_task_context()
72 kfree(tctx); in io_uring_alloc_task_context()
80 kfree(tctx); in io_uring_alloc_task_context()
84 xa_init(&tctx->xa); in io_uring_alloc_task_context()
88 task->io_uring = tctx; in io_uring_alloc_task_context()
160 if (!tctx) in io_uring_del_tctx_node()
174 tctx->last = NULL; in io_uring_del_tctx_node()
194 tctx->io_wq = NULL; in io_uring_clean_tctx()
[all …]
A Dcancel.c76 static int io_async_cancel_one(struct io_uring_task *tctx, in io_async_cancel_one() argument
83 if (!tctx || !tctx->io_wq) in io_async_cancel_one()
87 cancel_ret = io_wq_cancel_cb(tctx->io_wq, io_cancel_cb, cd, all); in io_async_cancel_one()
109 WARN_ON_ONCE(!io_wq_current_is_worker() && tctx != current->io_uring); in io_try_cancel()
111 ret = io_async_cancel_one(tctx, cd); in io_try_cancel()
166 struct io_uring_task *tctx, in __io_async_cancel() argument
175 ret = io_try_cancel(tctx, cd, issue_flags); in __io_async_cancel()
208 struct io_uring_task *tctx = req->task->io_uring; in io_async_cancel() local
227 ret = __io_async_cancel(&cd, tctx, issue_flags); in io_async_cancel()
245 static int __io_sync_cancel(struct io_uring_task *tctx, in __io_sync_cancel() argument
[all …]
A 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()
A Dio_uring.c517 BUG_ON(!tctx); in io_queue_iowq()
518 BUG_ON(!tctx->io_wq); in io_queue_iowq()
685 wake_up(&tctx->wait); in io_put_task_remote()
719 tctx->cached_refs = 0; in io_uring_drop_tctx_refs()
1148 struct io_uring_task *tctx; in tctx_task_work() local
2377 if (!tctx) in current_pending_io()
2876 if (tctx && !atomic_read(&tctx->in_cancel)) in io_tctx_exit_cb()
3069 if (!tctx || !tctx->io_wq) in io_uring_try_cancel_iowq()
3100 } else if (tctx && tctx->io_wq) { in io_uring_try_cancel_requests()
3162 if (tctx->io_wq) in io_uring_cancel_generic()
[all …]
A Dregister.c257 struct io_uring_task *tctx = NULL; in io_register_iowq_max_workers() local
281 tctx = sqd->thread->io_uring; in io_register_iowq_max_workers()
284 tctx = current->io_uring; in io_register_iowq_max_workers()
294 if (tctx && tctx->io_wq) { in io_register_iowq_max_workers()
295 ret = io_wq_max_workers(tctx->io_wq, new_count); in io_register_iowq_max_workers()
318 tctx = node->task->io_uring; in io_register_iowq_max_workers()
319 if (WARN_ON_ONCE(!tctx->io_wq)) in io_register_iowq_max_workers()
325 (void)io_wq_max_workers(tctx->io_wq, new_count); in io_register_iowq_max_workers()
573 struct io_uring_task *tctx = current->io_uring; in io_uring_register_get_file() local
575 if (unlikely(!tctx || fd >= IO_RINGFD_REG_MAX)) in io_uring_register_get_file()
[all …]
A Dio_uring.h89 struct llist_node *tctx_task_work_run(struct io_uring_task *tctx, unsigned int max_entries, unsigne…
95 int io_ring_add_registered_file(struct io_uring_task *tctx, struct file *file,
109 void io_task_refs_refill(struct io_uring_task *tctx);
379 struct io_uring_task *tctx = current->io_uring; in io_get_task_refs() local
381 tctx->cached_refs -= nr; in io_get_task_refs()
382 if (unlikely(tctx->cached_refs < 0)) in io_get_task_refs()
383 io_task_refs_refill(tctx); in io_get_task_refs()
/linux/tools/testing/selftests/lsm/
A Dlsm_get_self_attr_test.c191 tctx = ctx; in TEST()
195 tctx = next_ctx(tctx); in TEST()
204 tctx = ctx; in TEST()
209 tctx = next_ctx(tctx); in TEST()
218 tctx = ctx; in TEST()
223 tctx = next_ctx(tctx); in TEST()
232 tctx = ctx; in TEST()
237 tctx = next_ctx(tctx); in TEST()
246 tctx = ctx; in TEST()
250 tctx = next_ctx(tctx); in TEST()
[all …]
A Dlsm_set_self_attr_test.c61 struct lsm_ctx *tctx = (struct lsm_ctx *)ctx; in TEST() local
65 ASSERT_LE(1, lsm_get_self_attr(LSM_ATTR_CURRENT, tctx, &size, in TEST()
68 ASSERT_EQ(-1, lsm_set_self_attr(LSM_ATTR_CURRENT | LSM_ATTR_PREV, tctx, in TEST()
/linux/drivers/crypto/
A Dgeode-aes.c97 _writefield(AES_WRITEKEY0_REG, tctx->key); in geode_aes_crypt()
115 tctx->keylen = len; in geode_setkey_cip()
118 memcpy(tctx->key, key, len); in geode_setkey_cip()
130 tctx->fallback.cip->base.crt_flags |= in geode_setkey_cip()
141 tctx->keylen = len; in geode_setkey_skcipher()
144 memcpy(tctx->key, key, len); in geode_setkey_skcipher()
200 if (IS_ERR(tctx->fallback.cip)) { in fallback_init_cip()
202 return PTR_ERR(tctx->fallback.cip); in fallback_init_cip()
212 crypto_free_cipher(tctx->fallback.cip); in fallback_exit_cip()
243 tctx->fallback.skcipher = in geode_init_skcipher()
[all …]
/linux/crypto/
A Dhctr2.c86 u8 *p = (u8 *)tctx + sizeof(*tctx); in hctr2_hashed_tweaklen()
115 shash->tfm = tctx->polyval; in hctr2_hash_tweaklen()
155 memset(tctx->L, 0, sizeof(tctx->L)); in hctr2_setkey()
156 tctx->L[0] = 0x01; in hctr2_setkey()
157 crypto_cipher_encrypt_one(tctx->blockcipher, tctx->L, tctx->L); in hctr2_setkey()
167 return hctr2_hash_tweaklen(tctx, true) ?: hctr2_hash_tweaklen(tctx, false); in hctr2_setkey()
179 hash_desc->tfm = tctx->polyval; in hctr2_hash_tweak()
240 hash_desc->tfm = tctx->polyval; in hctr2_finish()
361 tctx->xctr = xctr; in hctr2_init_tfm()
362 tctx->blockcipher = blockcipher; in hctr2_init_tfm()
[all …]
A Dessiv.c112 desc->tfm = tctx->hash; in essiv_aead_setkey()
271 struct essiv_tfm_ctx *tctx) in essiv_init_tfm() argument
287 tctx->essiv_cipher = essiv_cipher; in essiv_init_tfm()
288 tctx->hash = hash; in essiv_init_tfm()
312 err = essiv_init_tfm(ictx, tctx); in essiv_skcipher_init_tfm()
318 tctx->u.skcipher = skcipher; in essiv_skcipher_init_tfm()
345 err = essiv_init_tfm(ictx, tctx); in essiv_aead_init_tfm()
351 tctx->u.aead = aead; in essiv_aead_init_tfm()
361 crypto_free_shash(tctx->hash); in essiv_skcipher_exit_tfm()
368 crypto_free_aead(tctx->u.aead); in essiv_aead_exit_tfm()
[all …]
A Dadiantum.c133 crypto_skcipher_set_flags(tctx->streamcipher, in adiantum_setkey()
161 crypto_cipher_set_flags(tctx->blockcipher, in adiantum_setkey()
164 err = crypto_cipher_setkey(tctx->blockcipher, keyp, in adiantum_setkey()
299 rctx->u.hash_desc.tfm = tctx->hash; in adiantum_finish()
361 rctx->u.hash_desc.tfm = tctx->hash; in adiantum_crypt()
454 tctx->streamcipher = streamcipher; in adiantum_init_tfm()
455 tctx->blockcipher = blockcipher; in adiantum_init_tfm()
456 tctx->hash = hash; in adiantum_init_tfm()
483 crypto_free_skcipher(tctx->streamcipher); in adiantum_exit_tfm()
484 crypto_free_cipher(tctx->blockcipher); in adiantum_exit_tfm()
[all …]
A Dhmac.c37 struct hmac_ctx *tctx = crypto_shash_ctx(parent); in hmac_setkey() local
38 struct crypto_shash *hash = tctx->hash; in hmac_setkey()
39 u8 *ipad = &tctx->pads[0]; in hmac_setkey()
40 u8 *opad = &tctx->pads[ss]; in hmac_setkey()
88 desc->tfm = tctx->hash; in hmac_import()
97 return hmac_import(pdesc, &tctx->pads[0]); in hmac_init()
114 const u8 *opad = &tctx->pads[ss]; in hmac_final()
130 const u8 *opad = &tctx->pads[ss]; in hmac_finup()
143 struct hmac_ctx *tctx = crypto_shash_ctx(parent); in hmac_init_tfm() local
152 tctx->hash = hash; in hmac_init_tfm()
[all …]
A Dvmac.c403 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()
450 tctx->nhkey[i] = be64_to_cpu(out[0]); in vmac_setkey()
471 tctx->l3key[i] = be64_to_cpu(out[0]); in vmac_setkey()
474 } while (tctx->l3key[i] >= p64 || tctx->l3key[i+1] >= p64); in vmac_setkey()
552 poly_step(ch, cl, tctx->polykey[0], tctx->polykey[1], in vhash_final()
559 return l3hash(ch, cl, tctx->l3key[0], tctx->l3key[1], partial * 8); in vhash_final()
582 hash = vhash_final(tctx, dctx); in vmac_final()
608 tctx->cipher = cipher; in vmac_init_tfm()
[all …]
A 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()
A Dxcbc.c87 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_update() local
89 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_update()
132 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_final() local
134 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_final()
155 crypto_xor(prev, &tctx->consts[offset], bs); in crypto_xcbc_digest_final()
/linux/drivers/crypto/intel/keembay/
A Dkeembay-ocs-aes-core.c125 if (tctx->aes_dev) { in kmb_ocs_aes_find_dev()
132 tctx->aes_dev = aes_dev; in kmb_ocs_aes_find_dev()
176 tctx->cipher = cipher; in save_key()
901 rc = ocs_aes_ccm_op(tctx->aes_dev, tctx->cipher, in kmb_ocs_aead_run()
910 rc = ocs_aes_gcm_op(tctx->aes_dev, tctx->cipher, in kmb_ocs_aead_run()
959 err = ocs_aes_set_key(tctx->aes_dev, tctx->key_len, tctx->key, in kmb_ocs_aes_sk_do_one_request()
980 if (!tctx->aes_dev) in kmb_ocs_aes_aead_do_one_request()
983 err = ocs_aes_set_key(tctx->aes_dev, tctx->key_len, tctx->key, in kmb_ocs_aes_aead_do_one_request()
1178 if (tctx->aes_dev) in clear_key()
1187 clear_key(tctx); in ocs_exit_tfm()
[all …]
A Dkeembay-ocs-ecc.c205 if (tctx->ecc_dev) in kmb_ocs_ecc_find_dev()
206 return tctx->ecc_dev; in kmb_ocs_ecc_find_dev()
216 return tctx->ecc_dev; in kmb_ocs_ecc_find_dev()
554 rc = kmb_ecc_gen_privkey(tctx->curve, tctx->private_key); in kmb_ocs_ecdh_set_secret()
569 tctx->curve = NULL; in kmb_ocs_ecdh_set_secret()
729 if (!tctx->curve) in kmb_ocs_ecdh_generate_public_key()
754 if (!tctx->curve) in kmb_ocs_ecdh_compute_shared_secret()
778 memset(tctx, 0, sizeof(*tctx)); in kmb_ecc_tctx_init()
780 tctx->ecc_dev = kmb_ocs_ecc_find_dev(tctx); in kmb_ecc_tctx_init()
789 if (!tctx->curve) in kmb_ecc_tctx_init()
[all …]
/linux/tools/testing/selftests/sched_ext/
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/tools/sched_ext/
A Dscx_qmap.bpf.c151 struct task_ctx *tctx; in lookup_task_ctx() local
157 return tctx; in lookup_task_ctx()
163 struct task_ctx *tctx; in BPF_STRUCT_OPS() local
197 struct task_ctx *tctx; in BPF_STRUCT_OPS() local
270 tctx->highpri = true; in BPF_STRUCT_OPS()
290 struct task_ctx *tctx; in update_core_sched_head_seq() local
319 if (tctx->highpri) { in dispatch_highpri()
369 struct task_ctx *tctx; in BPF_STRUCT_OPS() local
428 if (tctx->highpri) in BPF_STRUCT_OPS()
458 if (!tctx) { in BPF_STRUCT_OPS()
[all …]
/linux/arch/riscv/crypto/
A Dghash-riscv64-glue.c36 struct riscv64_ghash_tfm_ctx *tctx = crypto_shash_ctx(tfm); in riscv64_ghash_setkey() local
41 memcpy(&tctx->key, key, GHASH_BLOCK_SIZE); in riscv64_ghash_setkey()
56 riscv64_ghash_blocks(const struct riscv64_ghash_tfm_ctx *tctx, in riscv64_ghash_blocks() argument
63 ghash_zvkg(&dctx->accumulator, &tctx->key, src, srclen); in riscv64_ghash_blocks()
69 gf128mul_lle(&dctx->accumulator, &tctx->key); in riscv64_ghash_blocks()
79 const struct riscv64_ghash_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in riscv64_ghash_update() local
91 riscv64_ghash_blocks(tctx, dctx, dctx->buffer, in riscv64_ghash_update()
100 riscv64_ghash_blocks(tctx, dctx, src, len); in riscv64_ghash_update()
115 const struct riscv64_ghash_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in riscv64_ghash_final() local
123 riscv64_ghash_blocks(tctx, dctx, dctx->buffer, in riscv64_ghash_final()
/linux/arch/arm64/crypto/
A 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/arch/x86/crypto/
A 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/include/crypto/internal/
A 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/drivers/crypto/aspeed/
A Daspeed-hace-hash.c353 struct aspeed_sha_hmac_ctx *bctx = tctx->base; in aspeed_ahash_hmac_resume()
539 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; in aspeed_ahash_do_request()
667 struct aspeed_sha_hmac_ctx *bctx = tctx->base; in aspeed_sham_init()
736 if (tctx->flags & SHA_FLAGS_HMAC) { in aspeed_sham_init()
756 struct aspeed_sha_hmac_ctx *bctx = tctx->base; in aspeed_sham_setkey()
795 tctx->hace_dev = ast_alg->hace_dev; in aspeed_sham_cra_init()
796 tctx->flags = 0; in aspeed_sham_cra_init()
803 struct aspeed_sha_hmac_ctx *bctx = tctx->base; in aspeed_sham_cra_init()
805 tctx->flags |= SHA_FLAGS_HMAC; in aspeed_sham_cra_init()
826 if (tctx->flags & SHA_FLAGS_HMAC) { in aspeed_sham_cra_exit()
[all …]

Completed in 96 milliseconds

12