Lines Matching refs:tfm

141 	refcnt = crypto_tfm_ctx(request->tfm);  in cryptd_enqueue_request()
187 static inline struct cryptd_queue *cryptd_get_queue(struct crypto_tfm *tfm) in cryptd_get_queue() argument
189 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm); in cryptd_get_queue()
270 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_complete() local
271 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_complete()
285 crypto_free_skcipher(tfm); in cryptd_skcipher_complete()
316 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_enqueue() local
320 queue = cryptd_get_queue(crypto_skcipher_tfm(tfm)); in cryptd_skcipher_enqueue()
339 static int cryptd_skcipher_init_tfm(struct crypto_skcipher *tfm) in cryptd_skcipher_init_tfm() argument
341 struct skcipher_instance *inst = skcipher_alg_instance(tfm); in cryptd_skcipher_init_tfm()
344 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_init_tfm()
353 tfm, sizeof(struct cryptd_skcipher_request_ctx) + in cryptd_skcipher_init_tfm()
358 static void cryptd_skcipher_exit_tfm(struct crypto_skcipher *tfm) in cryptd_skcipher_exit_tfm() argument
360 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_exit_tfm()
430 static int cryptd_hash_init_tfm(struct crypto_ahash *tfm) in cryptd_hash_init_tfm() argument
432 struct ahash_instance *inst = ahash_alg_instance(tfm); in cryptd_hash_init_tfm()
435 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm); in cryptd_hash_init_tfm()
443 crypto_ahash_set_reqsize(tfm, in cryptd_hash_init_tfm()
450 struct crypto_ahash *tfm) in cryptd_hash_clone_tfm() argument
453 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm); in cryptd_hash_clone_tfm()
464 static void cryptd_hash_exit_tfm(struct crypto_ahash *tfm) in cryptd_hash_exit_tfm() argument
466 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm); in cryptd_hash_exit_tfm()
487 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_enqueue() local
489 cryptd_get_queue(crypto_ahash_tfm(tfm)); in cryptd_hash_enqueue()
516 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_complete() local
517 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm); in cryptd_hash_complete()
528 crypto_free_ahash(tfm); in cryptd_hash_complete()
534 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_init() local
535 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm); in cryptd_hash_init()
543 desc->tfm = child; in cryptd_hash_init()
610 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_digest() local
611 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm); in cryptd_hash_digest()
619 desc->tfm = child; in cryptd_hash_digest()
641 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_import() local
642 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm); in cryptd_hash_import()
645 desc->tfm = ctx->child; in cryptd_hash_import()
745 struct crypto_aead *tfm; in cryptd_aead_crypt() local
753 tfm = crypto_aead_reqtfm(req); in cryptd_aead_crypt()
768 ctx = crypto_aead_ctx(tfm); in cryptd_aead_crypt()
781 crypto_free_aead(tfm); in cryptd_aead_crypt()
812 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in cryptd_aead_enqueue() local
813 struct cryptd_queue *queue = cryptd_get_queue(crypto_aead_tfm(tfm)); in cryptd_aead_enqueue()
833 static int cryptd_aead_init_tfm(struct crypto_aead *tfm) in cryptd_aead_init_tfm() argument
835 struct aead_instance *inst = aead_alg_instance(tfm); in cryptd_aead_init_tfm()
838 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(tfm); in cryptd_aead_init_tfm()
847 tfm, sizeof(struct cryptd_aead_request_ctx) + in cryptd_aead_init_tfm()
852 static void cryptd_aead_exit_tfm(struct crypto_aead *tfm) in cryptd_aead_exit_tfm() argument
854 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(tfm); in cryptd_aead_exit_tfm()
954 struct crypto_skcipher *tfm; in cryptd_alloc_skcipher() local
960 tfm = crypto_alloc_skcipher(cryptd_alg_name, type, mask); in cryptd_alloc_skcipher()
961 if (IS_ERR(tfm)) in cryptd_alloc_skcipher()
962 return ERR_CAST(tfm); in cryptd_alloc_skcipher()
964 if (tfm->base.__crt_alg->cra_module != THIS_MODULE) { in cryptd_alloc_skcipher()
965 crypto_free_skcipher(tfm); in cryptd_alloc_skcipher()
969 ctx = crypto_skcipher_ctx(tfm); in cryptd_alloc_skcipher()
972 return container_of(tfm, struct cryptd_skcipher, base); in cryptd_alloc_skcipher()
976 struct crypto_skcipher *cryptd_skcipher_child(struct cryptd_skcipher *tfm) in cryptd_skcipher_child() argument
978 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(&tfm->base); in cryptd_skcipher_child()
984 bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm) in cryptd_skcipher_queued() argument
986 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(&tfm->base); in cryptd_skcipher_queued()
992 void cryptd_free_skcipher(struct cryptd_skcipher *tfm) in cryptd_free_skcipher() argument
994 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(&tfm->base); in cryptd_free_skcipher()
997 crypto_free_skcipher(&tfm->base); in cryptd_free_skcipher()
1006 struct crypto_ahash *tfm; in cryptd_alloc_ahash() local
1011 tfm = crypto_alloc_ahash(cryptd_alg_name, type, mask); in cryptd_alloc_ahash()
1012 if (IS_ERR(tfm)) in cryptd_alloc_ahash()
1013 return ERR_CAST(tfm); in cryptd_alloc_ahash()
1014 if (tfm->base.__crt_alg->cra_module != THIS_MODULE) { in cryptd_alloc_ahash()
1015 crypto_free_ahash(tfm); in cryptd_alloc_ahash()
1019 ctx = crypto_ahash_ctx(tfm); in cryptd_alloc_ahash()
1022 return __cryptd_ahash_cast(tfm); in cryptd_alloc_ahash()
1026 struct crypto_shash *cryptd_ahash_child(struct cryptd_ahash *tfm) in cryptd_ahash_child() argument
1028 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(&tfm->base); in cryptd_ahash_child()
1041 bool cryptd_ahash_queued(struct cryptd_ahash *tfm) in cryptd_ahash_queued() argument
1043 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(&tfm->base); in cryptd_ahash_queued()
1049 void cryptd_free_ahash(struct cryptd_ahash *tfm) in cryptd_free_ahash() argument
1051 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(&tfm->base); in cryptd_free_ahash()
1054 crypto_free_ahash(&tfm->base); in cryptd_free_ahash()
1063 struct crypto_aead *tfm; in cryptd_alloc_aead() local
1068 tfm = crypto_alloc_aead(cryptd_alg_name, type, mask); in cryptd_alloc_aead()
1069 if (IS_ERR(tfm)) in cryptd_alloc_aead()
1070 return ERR_CAST(tfm); in cryptd_alloc_aead()
1071 if (tfm->base.__crt_alg->cra_module != THIS_MODULE) { in cryptd_alloc_aead()
1072 crypto_free_aead(tfm); in cryptd_alloc_aead()
1076 ctx = crypto_aead_ctx(tfm); in cryptd_alloc_aead()
1079 return __cryptd_aead_cast(tfm); in cryptd_alloc_aead()
1083 struct crypto_aead *cryptd_aead_child(struct cryptd_aead *tfm) in cryptd_aead_child() argument
1086 ctx = crypto_aead_ctx(&tfm->base); in cryptd_aead_child()
1091 bool cryptd_aead_queued(struct cryptd_aead *tfm) in cryptd_aead_queued() argument
1093 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(&tfm->base); in cryptd_aead_queued()
1099 void cryptd_free_aead(struct cryptd_aead *tfm) in cryptd_free_aead() argument
1101 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(&tfm->base); in cryptd_free_aead()
1104 crypto_free_aead(&tfm->base); in cryptd_free_aead()