• Home
  • Raw
  • Download

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()
242 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_complete() local
243 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_complete()
252 crypto_free_skcipher(tfm); in cryptd_skcipher_complete()
260 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_encrypt() local
261 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_encrypt()
288 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_decrypt() local
289 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_decrypt()
315 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_enqueue() local
318 queue = cryptd_get_queue(crypto_skcipher_tfm(tfm)); in cryptd_skcipher_enqueue()
335 static int cryptd_skcipher_init_tfm(struct crypto_skcipher *tfm) in cryptd_skcipher_init_tfm() argument
337 struct skcipher_instance *inst = skcipher_alg_instance(tfm); in cryptd_skcipher_init_tfm()
340 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_init_tfm()
349 tfm, sizeof(struct cryptd_skcipher_request_ctx) + in cryptd_skcipher_init_tfm()
354 static void cryptd_skcipher_exit_tfm(struct crypto_skcipher *tfm) in cryptd_skcipher_exit_tfm() argument
356 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in cryptd_skcipher_exit_tfm()
426 static int cryptd_hash_init_tfm(struct crypto_tfm *tfm) in cryptd_hash_init_tfm() argument
428 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm); in cryptd_hash_init_tfm()
431 struct cryptd_hash_ctx *ctx = crypto_tfm_ctx(tfm); in cryptd_hash_init_tfm()
439 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), in cryptd_hash_init_tfm()
445 static void cryptd_hash_exit_tfm(struct crypto_tfm *tfm) in cryptd_hash_exit_tfm() argument
447 struct cryptd_hash_ctx *ctx = crypto_tfm_ctx(tfm); in cryptd_hash_exit_tfm()
468 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_enqueue() local
470 cryptd_get_queue(crypto_ahash_tfm(tfm)); in cryptd_hash_enqueue()
480 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_complete() local
481 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm); in cryptd_hash_complete()
490 crypto_free_ahash(tfm); in cryptd_hash_complete()
495 struct cryptd_hash_ctx *ctx = crypto_tfm_ctx(req_async->tfm); in cryptd_hash_init()
504 desc->tfm = child; in cryptd_hash_init()
586 struct cryptd_hash_ctx *ctx = crypto_tfm_ctx(req_async->tfm); in cryptd_hash_digest()
595 desc->tfm = child; in cryptd_hash_digest()
619 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_import() local
620 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm); in cryptd_hash_import()
623 desc->tfm = ctx->child; in cryptd_hash_import()
722 struct crypto_aead *tfm; in cryptd_aead_crypt() local
728 tfm = crypto_aead_reqtfm(req); in cryptd_aead_crypt()
736 ctx = crypto_aead_ctx(tfm); in cryptd_aead_crypt()
744 crypto_free_aead(tfm); in cryptd_aead_crypt()
749 struct cryptd_aead_ctx *ctx = crypto_tfm_ctx(areq->tfm); in cryptd_aead_encrypt()
759 struct cryptd_aead_ctx *ctx = crypto_tfm_ctx(areq->tfm); in cryptd_aead_decrypt()
771 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in cryptd_aead_enqueue() local
772 struct cryptd_queue *queue = cryptd_get_queue(crypto_aead_tfm(tfm)); in cryptd_aead_enqueue()
789 static int cryptd_aead_init_tfm(struct crypto_aead *tfm) in cryptd_aead_init_tfm() argument
791 struct aead_instance *inst = aead_alg_instance(tfm); in cryptd_aead_init_tfm()
794 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(tfm); in cryptd_aead_init_tfm()
803 tfm, max((unsigned)sizeof(struct cryptd_aead_request_ctx), in cryptd_aead_init_tfm()
808 static void cryptd_aead_exit_tfm(struct crypto_aead *tfm) in cryptd_aead_exit_tfm() argument
810 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(tfm); in cryptd_aead_exit_tfm()
910 struct crypto_skcipher *tfm; in cryptd_alloc_skcipher() local
916 tfm = crypto_alloc_skcipher(cryptd_alg_name, type, mask); in cryptd_alloc_skcipher()
917 if (IS_ERR(tfm)) in cryptd_alloc_skcipher()
918 return ERR_CAST(tfm); in cryptd_alloc_skcipher()
920 if (tfm->base.__crt_alg->cra_module != THIS_MODULE) { in cryptd_alloc_skcipher()
921 crypto_free_skcipher(tfm); in cryptd_alloc_skcipher()
925 ctx = crypto_skcipher_ctx(tfm); in cryptd_alloc_skcipher()
928 return container_of(tfm, struct cryptd_skcipher, base); in cryptd_alloc_skcipher()
932 struct crypto_skcipher *cryptd_skcipher_child(struct cryptd_skcipher *tfm) in cryptd_skcipher_child() argument
934 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(&tfm->base); in cryptd_skcipher_child()
940 bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm) in cryptd_skcipher_queued() argument
942 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(&tfm->base); in cryptd_skcipher_queued()
948 void cryptd_free_skcipher(struct cryptd_skcipher *tfm) in cryptd_free_skcipher() argument
950 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(&tfm->base); in cryptd_free_skcipher()
953 crypto_free_skcipher(&tfm->base); in cryptd_free_skcipher()
962 struct crypto_ahash *tfm; in cryptd_alloc_ahash() local
967 tfm = crypto_alloc_ahash(cryptd_alg_name, type, mask); in cryptd_alloc_ahash()
968 if (IS_ERR(tfm)) in cryptd_alloc_ahash()
969 return ERR_CAST(tfm); in cryptd_alloc_ahash()
970 if (tfm->base.__crt_alg->cra_module != THIS_MODULE) { in cryptd_alloc_ahash()
971 crypto_free_ahash(tfm); in cryptd_alloc_ahash()
975 ctx = crypto_ahash_ctx(tfm); in cryptd_alloc_ahash()
978 return __cryptd_ahash_cast(tfm); in cryptd_alloc_ahash()
982 struct crypto_shash *cryptd_ahash_child(struct cryptd_ahash *tfm) in cryptd_ahash_child() argument
984 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(&tfm->base); in cryptd_ahash_child()
997 bool cryptd_ahash_queued(struct cryptd_ahash *tfm) in cryptd_ahash_queued() argument
999 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(&tfm->base); in cryptd_ahash_queued()
1005 void cryptd_free_ahash(struct cryptd_ahash *tfm) in cryptd_free_ahash() argument
1007 struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(&tfm->base); in cryptd_free_ahash()
1010 crypto_free_ahash(&tfm->base); in cryptd_free_ahash()
1019 struct crypto_aead *tfm; in cryptd_alloc_aead() local
1024 tfm = crypto_alloc_aead(cryptd_alg_name, type, mask); in cryptd_alloc_aead()
1025 if (IS_ERR(tfm)) in cryptd_alloc_aead()
1026 return ERR_CAST(tfm); in cryptd_alloc_aead()
1027 if (tfm->base.__crt_alg->cra_module != THIS_MODULE) { in cryptd_alloc_aead()
1028 crypto_free_aead(tfm); in cryptd_alloc_aead()
1032 ctx = crypto_aead_ctx(tfm); in cryptd_alloc_aead()
1035 return __cryptd_aead_cast(tfm); in cryptd_alloc_aead()
1039 struct crypto_aead *cryptd_aead_child(struct cryptd_aead *tfm) in cryptd_aead_child() argument
1042 ctx = crypto_aead_ctx(&tfm->base); in cryptd_aead_child()
1047 bool cryptd_aead_queued(struct cryptd_aead *tfm) in cryptd_aead_queued() argument
1049 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(&tfm->base); in cryptd_aead_queued()
1055 void cryptd_free_aead(struct cryptd_aead *tfm) in cryptd_free_aead() argument
1057 struct cryptd_aead_ctx *ctx = crypto_aead_ctx(&tfm->base); in cryptd_free_aead()
1060 crypto_free_aead(&tfm->base); in cryptd_free_aead()