Home
last modified time | relevance | path

Searched refs:areq (Results 1 – 25 of 51) sorted by relevance

123

/linux/drivers/crypto/allwinner/sun4i-ss/
H A Dsun4i-ss-cipher.c15 static int noinline_for_stack sun4i_ss_opti_poll(struct skcipher_request *areq) in sun4i_ss_opti_poll() argument
17 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_opti_poll()
21 struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq); in sun4i_ss_opti_poll()
30 unsigned int ileft = areq->cryptlen; in sun4i_ss_opti_poll()
31 unsigned int oleft = areq->cryptlen; in sun4i_ss_opti_poll()
41 if (!areq->cryptlen) in sun4i_ss_opti_poll()
44 if (!areq->src || !areq->dst) { in sun4i_ss_opti_poll()
49 if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) { in sun4i_ss_opti_poll()
50 scatterwalk_map_and_copy(ctx->backup_iv, areq->src, in sun4i_ss_opti_poll()
51 areq->cryptlen - ivsize, ivsize, 0); in sun4i_ss_opti_poll()
[all …]
H A Dsun4i-ss-hash.c47 int sun4i_hash_init(struct ahash_request *areq) in sun4i_hash_init() argument
49 struct sun4i_req_ctx *op = ahash_request_ctx(areq); in sun4i_hash_init()
50 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun4i_hash_init()
62 int sun4i_hash_export_md5(struct ahash_request *areq, void *out) in sun4i_hash_export_md5() argument
64 struct sun4i_req_ctx *op = ahash_request_ctx(areq); in sun4i_hash_export_md5()
85 int sun4i_hash_import_md5(struct ahash_request *areq, const void *in) in sun4i_hash_import_md5() argument
87 struct sun4i_req_ctx *op = ahash_request_ctx(areq); in sun4i_hash_import_md5()
91 sun4i_hash_init(areq); in sun4i_hash_import_md5()
104 int sun4i_hash_export_sha1(struct ahash_request *areq, void *out) in sun4i_hash_export_sha1() argument
106 struct sun4i_req_ctx *op = ahash_request_ctx(areq); in sun4i_hash_export_sha1()
[all …]
H A Dsun4i-ss.h201 int sun4i_hash_init(struct ahash_request *areq);
202 int sun4i_hash_update(struct ahash_request *areq);
203 int sun4i_hash_final(struct ahash_request *areq);
204 int sun4i_hash_finup(struct ahash_request *areq);
205 int sun4i_hash_digest(struct ahash_request *areq);
206 int sun4i_hash_export_md5(struct ahash_request *areq, void *out);
207 int sun4i_hash_import_md5(struct ahash_request *areq, const void *in);
208 int sun4i_hash_export_sha1(struct ahash_request *areq, void *out);
209 int sun4i_hash_import_sha1(struct ahash_request *areq, const void *in);
211 int sun4i_ss_cbc_aes_encrypt(struct skcipher_request *areq);
[all …]
/linux/drivers/crypto/allwinner/sun8i-ce/
H A Dsun8i-ce-cipher.c24 static int sun8i_ce_cipher_need_fallback(struct skcipher_request *areq) in sun8i_ce_cipher_need_fallback() argument
26 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun8i_ce_cipher_need_fallback()
34 if (sg_nents_for_len(areq->src, areq->cryptlen) > MAX_SG || in sun8i_ce_cipher_need_fallback()
35 sg_nents_for_len(areq->dst, areq->cryptlen) > MAX_SG) { in sun8i_ce_cipher_need_fallback()
40 if (areq->cryptlen < crypto_skcipher_ivsize(tfm)) { in sun8i_ce_cipher_need_fallback()
45 if (areq->cryptlen == 0) { in sun8i_ce_cipher_need_fallback()
50 if (areq->cryptlen % 16) { in sun8i_ce_cipher_need_fallback()
55 len = areq->cryptlen; in sun8i_ce_cipher_need_fallback()
56 sg = areq->src; in sun8i_ce_cipher_need_fallback()
71 len = areq->cryptlen; in sun8i_ce_cipher_need_fallback()
[all …]
H A Dsun8i-ce-hash.c72 int sun8i_ce_hash_init(struct ahash_request *areq) in sun8i_ce_hash_init() argument
74 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ce_hash_init()
75 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun8i_ce_hash_init()
81 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; in sun8i_ce_hash_init()
86 int sun8i_ce_hash_export(struct ahash_request *areq, void *out) in sun8i_ce_hash_export() argument
88 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ce_hash_export()
89 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun8i_ce_hash_export()
93 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; in sun8i_ce_hash_export()
98 int sun8i_ce_hash_import(struct ahash_request *areq, const void *in) in sun8i_ce_hash_import() argument
100 struct sun8i_ce_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ce_hash_import()
[all …]
H A Dsun8i-ce.h367 int sun8i_ce_cipher_do_one(struct crypto_engine *engine, void *areq);
368 int sun8i_ce_skdecrypt(struct skcipher_request *areq);
369 int sun8i_ce_skencrypt(struct skcipher_request *areq);
377 int sun8i_ce_hash_init(struct ahash_request *areq);
378 int sun8i_ce_hash_export(struct ahash_request *areq, void *out);
379 int sun8i_ce_hash_import(struct ahash_request *areq, const void *in);
380 int sun8i_ce_hash_final(struct ahash_request *areq);
381 int sun8i_ce_hash_update(struct ahash_request *areq);
382 int sun8i_ce_hash_finup(struct ahash_request *areq);
383 int sun8i_ce_hash_digest(struct ahash_request *areq);
/linux/drivers/crypto/amlogic/
H A Damlogic-gxl-cipher.c25 static bool meson_cipher_need_fallback(struct skcipher_request *areq) in meson_cipher_need_fallback() argument
27 struct scatterlist *src_sg = areq->src; in meson_cipher_need_fallback()
28 struct scatterlist *dst_sg = areq->dst; in meson_cipher_need_fallback()
30 if (areq->cryptlen == 0) in meson_cipher_need_fallback()
58 static int meson_cipher_do_fallback(struct skcipher_request *areq) in meson_cipher_do_fallback() argument
60 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in meson_cipher_do_fallback()
62 struct meson_cipher_req_ctx *rctx = skcipher_request_ctx(areq); in meson_cipher_do_fallback()
72 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags, in meson_cipher_do_fallback()
73 areq->base.complete, areq->base.data); in meson_cipher_do_fallback()
74 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst, in meson_cipher_do_fallback()
[all …]
/linux/drivers/crypto/gemini/
H A Dsl3516-ce-cipher.c25 static bool sl3516_ce_need_fallback(struct skcipher_request *areq) in sl3516_ce_need_fallback() argument
27 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_need_fallback()
34 if (areq->cryptlen == 0 || areq->cryptlen % 16) { in sl3516_ce_need_fallback()
43 if (sg_nents(areq->src) > MAXDESC / 2) { in sl3516_ce_need_fallback()
48 if (sg_nents(areq->dst) > MAXDESC) { in sl3516_ce_need_fallback()
53 sg = areq->src; in sl3516_ce_need_fallback()
69 sg = areq->dst; in sl3516_ce_need_fallback()
87 in_sg = areq->src; in sl3516_ce_need_fallback()
88 out_sg = areq->dst; in sl3516_ce_need_fallback()
103 static int sl3516_ce_cipher_fallback(struct skcipher_request *areq) in sl3516_ce_cipher_fallback() argument
[all …]
/linux/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-cipher.c23 static bool sun8i_ss_need_fallback(struct skcipher_request *areq) in sun8i_ss_need_fallback() argument
25 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun8i_ss_need_fallback()
28 struct scatterlist *in_sg = areq->src; in sun8i_ss_need_fallback()
29 struct scatterlist *out_sg = areq->dst; in sun8i_ss_need_fallback()
33 if (areq->cryptlen == 0 || areq->cryptlen % 16) { in sun8i_ss_need_fallback()
38 if (sg_nents_for_len(areq->src, areq->cryptlen) > 8 || in sun8i_ss_need_fallback()
39 sg_nents_for_len(areq->dst, areq->cryptlen) > 8) { in sun8i_ss_need_fallback()
44 len = areq->cryptlen; in sun8i_ss_need_fallback()
45 sg = areq->src; in sun8i_ss_need_fallback()
59 len = areq->cryptlen; in sun8i_ss_need_fallback()
[all …]
H A Dsun8i-ss-hash.c144 int sun8i_ss_hash_init(struct ahash_request *areq) in sun8i_ss_hash_init() argument
146 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ss_hash_init()
147 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun8i_ss_hash_init()
153 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; in sun8i_ss_hash_init()
158 int sun8i_ss_hash_export(struct ahash_request *areq, void *out) in sun8i_ss_hash_export() argument
160 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ss_hash_export()
161 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun8i_ss_hash_export()
165 rctx->fallback_req.base.flags = areq->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP; in sun8i_ss_hash_export()
170 int sun8i_ss_hash_import(struct ahash_request *areq, const void *in) in sun8i_ss_hash_import() argument
172 struct sun8i_ss_hash_reqctx *rctx = ahash_request_ctx(areq); in sun8i_ss_hash_import()
[all …]
H A Dsun8i-ss.h294 int sun8i_ss_handle_cipher_request(struct crypto_engine *engine, void *areq);
295 int sun8i_ss_skdecrypt(struct skcipher_request *areq);
296 int sun8i_ss_skencrypt(struct skcipher_request *areq);
309 int sun8i_ss_hash_init(struct ahash_request *areq);
310 int sun8i_ss_hash_export(struct ahash_request *areq, void *out);
311 int sun8i_ss_hash_import(struct ahash_request *areq, const void *in);
312 int sun8i_ss_hash_final(struct ahash_request *areq);
313 int sun8i_ss_hash_update(struct ahash_request *areq);
314 int sun8i_ss_hash_finup(struct ahash_request *areq);
315 int sun8i_ss_hash_digest(struct ahash_request *areq);
/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_aead.c192 struct aead_request *areq = arg; in nitrox_aead_callback() local
193 struct nitrox_aead_rctx *rctx = aead_request_ctx(areq); in nitrox_aead_callback()
202 aead_request_complete(areq, err); in nitrox_aead_callback()
213 static int nitrox_aes_gcm_enc(struct aead_request *areq) in nitrox_aes_gcm_enc() argument
215 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in nitrox_aes_gcm_enc()
217 struct nitrox_aead_rctx *rctx = aead_request_ctx(areq); in nitrox_aes_gcm_enc()
222 if (!nitrox_aes_gcm_assoclen_supported(areq->assoclen)) in nitrox_aes_gcm_enc()
225 memcpy(fctx->crypto.iv, areq->iv, GCM_AES_SALT_SIZE); in nitrox_aes_gcm_enc()
227 rctx->cryptlen = areq->cryptlen; in nitrox_aes_gcm_enc()
228 rctx->assoclen = areq->assoclen; in nitrox_aes_gcm_enc()
[all …]
/linux/crypto/
H A Dalgif_skcipher.c84 struct af_alg_async_req *areq = data; in algif_skcipher_done() local
85 struct sock *sk = areq->sk; in algif_skcipher_done()
90 err = algif_skcipher_export(sk, &areq->cra_u.skcipher_req); in algif_skcipher_done()
106 struct af_alg_async_req *areq; in _skcipher_recvmsg() local
118 areq = af_alg_alloc_areq(sk, sizeof(struct af_alg_async_req) + in _skcipher_recvmsg()
120 if (IS_ERR(areq)) in _skcipher_recvmsg()
121 return PTR_ERR(areq); in _skcipher_recvmsg()
124 err = af_alg_get_rsgl(sk, msg, flags, areq, ctx->used, &len); in _skcipher_recvmsg()
141 areq->tsgl_entries = af_alg_count_tsgl(sk, len, 0); in _skcipher_recvmsg()
142 if (!areq->tsgl_entries) in _skcipher_recvmsg()
[all …]
H A Dalgif_aead.c100 struct af_alg_async_req *areq; in _aead_recvmsg() local
153 areq = af_alg_alloc_areq(sk, sizeof(struct af_alg_async_req) + in _aead_recvmsg()
155 if (IS_ERR(areq)) in _aead_recvmsg()
156 return PTR_ERR(areq); in _aead_recvmsg()
159 err = af_alg_get_rsgl(sk, msg, flags, areq, outlen, &usedpages); in _aead_recvmsg()
213 rsgl_src = areq->first_rsgl.sgl.sgt.sgl; in _aead_recvmsg()
227 areq->first_rsgl.sgl.sgt.sgl, in _aead_recvmsg()
246 areq->first_rsgl.sgl.sgt.sgl, in _aead_recvmsg()
252 areq->tsgl_entries = af_alg_count_tsgl(sk, processed, in _aead_recvmsg()
254 if (!areq->tsgl_entries) in _aead_recvmsg()
[all …]
H A Daf_alg.c770 static void af_alg_free_areq_sgls(struct af_alg_async_req *areq) in af_alg_free_areq_sgls() argument
772 struct sock *sk = areq->sk; in af_alg_free_areq_sgls()
780 list_for_each_entry_safe(rsgl, tmp, &areq->rsgl_list, list) { in af_alg_free_areq_sgls()
784 if (rsgl != &areq->first_rsgl) in af_alg_free_areq_sgls()
788 tsgl = areq->tsgl; in af_alg_free_areq_sgls()
790 for_each_sg(tsgl, sg, areq->tsgl_entries, i) { in af_alg_free_areq_sgls()
796 sock_kfree_s(sk, tsgl, areq->tsgl_entries * sizeof(*tsgl)); in af_alg_free_areq_sgls()
1117 void af_alg_free_resources(struct af_alg_async_req *areq) in af_alg_free_resources() argument
1119 struct sock *sk = areq->sk; in af_alg_free_resources()
1122 af_alg_free_areq_sgls(areq); in af_alg_free_resources()
[all …]
/linux/drivers/crypto/intel/qat/qat_common/
H A Dqat_comp_algs.c71 struct acomp_req *areq = qat_req->acompress_req; in qat_comp_resubmit() local
72 struct crypto_acomp *tfm = crypto_acomp_reqtfm(areq); in qat_comp_resubmit()
78 areq->dlen = dlen; in qat_comp_resubmit()
84 ret = qat_bl_realloc_map_new_dst(accel_dev, &areq->dst, dlen, qat_bufs, in qat_comp_resubmit()
85 qat_algs_alloc_flags(&areq->base)); in qat_comp_resubmit()
94 ret = qat_alg_send_dc_message(qat_req, inst, &areq->base); in qat_comp_resubmit()
100 acomp_request_complete(areq, ret); in qat_comp_resubmit()
106 struct acomp_req *areq = qat_req->acompress_req; in qat_comp_generic_callback() local
109 struct crypto_acomp *tfm = crypto_acomp_reqtfm(areq); in qat_comp_generic_callback()
130 areq->slen, areq->dlen, consumed, produced, cmp_err, xlt_err); in qat_comp_generic_callback()
[all …]
H A Dqat_algs.c671 struct aead_request *areq = qat_req->aead_req; in qat_aead_alg_callback() local
678 aead_request_complete(areq, res); in qat_aead_alg_callback()
783 static int qat_alg_aead_dec(struct aead_request *areq) in qat_alg_aead_dec() argument
785 struct crypto_aead *aead_tfm = crypto_aead_reqtfm(areq); in qat_alg_aead_dec()
788 struct qat_crypto_request *qat_req = aead_request_ctx(areq); in qat_alg_aead_dec()
793 gfp_t f = qat_algs_alloc_flags(&areq->base); in qat_alg_aead_dec()
797 cipher_len = areq->cryptlen - digst_size; in qat_alg_aead_dec()
801 ret = qat_bl_sgl_to_bufl(ctx->inst->accel_dev, areq->src, areq->dst, in qat_alg_aead_dec()
809 qat_req->aead_req = areq; in qat_alg_aead_dec()
816 cipher_param->cipher_offset = areq->assoclen; in qat_alg_aead_dec()
[all …]
/linux/drivers/crypto/rockchip/
H A Drk3288_crypto_ahash.c44 static int rk_ahash_digest_fb(struct ahash_request *areq) in rk_ahash_digest_fb() argument
46 struct rk_ahash_rctx *rctx = ahash_request_ctx(areq); in rk_ahash_digest_fb()
47 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in rk_ahash_digest_fb()
55 rctx->fallback_req.base.flags = areq->base.flags & in rk_ahash_digest_fb()
58 rctx->fallback_req.nbytes = areq->nbytes; in rk_ahash_digest_fb()
59 rctx->fallback_req.src = areq->src; in rk_ahash_digest_fb()
60 rctx->fallback_req.result = areq->result; in rk_ahash_digest_fb()
235 struct ahash_request *areq = container_of(breq, struct ahash_request, base); in rk_hash_prepare() local
236 struct rk_ahash_rctx *rctx = ahash_request_ctx(areq); in rk_hash_prepare()
240 ret = dma_map_sg(rkc->dev, areq->src, sg_nents(areq->src), DMA_TO_DEVICE); in rk_hash_prepare()
[all …]
H A Drk3288_crypto_skcipher.c68 static int rk_cipher_fallback(struct skcipher_request *areq) in rk_cipher_fallback() argument
70 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in rk_cipher_fallback()
72 struct rk_cipher_rctx *rctx = skcipher_request_ctx(areq); in rk_cipher_fallback()
80 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags, in rk_cipher_fallback()
81 areq->base.complete, areq->base.data); in rk_cipher_fallback()
82 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst, in rk_cipher_fallback()
83 areq->cryptlen, areq->iv); in rk_cipher_fallback()
301 struct skcipher_request *areq = container_of(async_req, struct skcipher_request, base); in rk_cipher_run() local
302 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in rk_cipher_run()
303 struct rk_cipher_rctx *rctx = skcipher_request_ctx(areq); in rk_cipher_run()
[all …]
/linux/drivers/net/ethernet/fungible/funcore/
H A Dfun_dev.c225 const struct fun_dev_params *areq) in fun_enable_admin_queue() argument
228 .cqe_size_log2 = areq->cqe_size_log2, in fun_enable_admin_queue()
229 .sqe_size_log2 = areq->sqe_size_log2, in fun_enable_admin_queue()
230 .cq_depth = areq->cq_depth, in fun_enable_admin_queue()
231 .sq_depth = areq->sq_depth, in fun_enable_admin_queue()
232 .rq_depth = areq->rq_depth, in fun_enable_admin_queue()
234 unsigned int ntags = areq->sq_depth - 1; in fun_enable_admin_queue()
241 if (areq->sq_depth < AQA_MIN_QUEUE_SIZE || in fun_enable_admin_queue()
242 areq->sq_depth > AQA_MAX_QUEUE_SIZE || in fun_enable_admin_queue()
243 areq->cq_depth < AQA_MIN_QUEUE_SIZE || in fun_enable_admin_queue()
[all …]
/linux/drivers/crypto/marvell/octeontx2/
H A Dotx2_cptvf_reqmgr.c79 pentry->areq = NULL; in free_pentry()
99 gfp = (req->areq->flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? GFP_KERNEL : in process_request()
145 pentry->areq = req->areq; in process_request()
294 struct crypto_async_request *areq; in process_pending_queue() local
355 areq = resume_pentry->areq; in process_pending_queue()
364 callback(-EINPROGRESS, areq, info); in process_pending_queue()
370 areq = pentry->areq; in process_pending_queue()
383 callback(res_code, areq, info); in process_pending_queue()
/linux/drivers/crypto/
H A Datmel-i2c.h168 void (*cbk)(struct atmel_i2c_work_data *work_data, void *areq,
170 void *areq; member
179 void *areq, int status),
180 void *areq);
/linux/drivers/crypto/aspeed/
H A Daspeed-hace-crypto.c27 static int aspeed_crypto_do_fallback(struct skcipher_request *areq) in aspeed_crypto_do_fallback() argument
29 struct aspeed_cipher_reqctx *rctx = skcipher_request_ctx(areq); in aspeed_crypto_do_fallback()
30 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in aspeed_crypto_do_fallback()
35 skcipher_request_set_callback(&rctx->fallback_req, areq->base.flags, in aspeed_crypto_do_fallback()
36 areq->base.complete, areq->base.data); in aspeed_crypto_do_fallback()
37 skcipher_request_set_crypt(&rctx->fallback_req, areq->src, areq->dst, in aspeed_crypto_do_fallback()
38 areq->cryptlen, areq->iv); in aspeed_crypto_do_fallback()
48 static bool aspeed_crypto_need_fallback(struct skcipher_request *areq) in aspeed_crypto_need_fallback() argument
50 struct aspeed_cipher_reqctx *rctx = skcipher_request_ctx(areq); in aspeed_crypto_need_fallback()
52 if (areq->cryptlen == 0) in aspeed_crypto_need_fallback()
[all …]
/linux/drivers/crypto/hisilicon/hpre/
H A Dhpre_crypto.c146 } areq; member
439 struct kpp_request *areq; in hpre_dh_cb() local
444 areq = req->areq.dh; in hpre_dh_cb()
445 areq->dst_len = ctx->key_sz; in hpre_dh_cb()
451 hpre_hw_data_clr_all(ctx, req, areq->dst, areq->src); in hpre_dh_cb()
452 kpp_request_complete(areq, ret); in hpre_dh_cb()
460 struct akcipher_request *areq; in hpre_rsa_cb() local
470 areq = req->areq.rsa; in hpre_rsa_cb()
471 areq->dst_len = ctx->key_sz; in hpre_rsa_cb()
472 hpre_hw_data_clr_all(ctx, req, areq->dst, areq->src); in hpre_rsa_cb()
[all …]
/linux/drivers/crypto/marvell/octeontx/
H A Dotx_cptvf_reqmgr.c91 pentry->areq = NULL; in free_pentry()
312 gfp = (req->areq->flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? GFP_KERNEL : in process_request()
356 pentry->areq = req->areq; in process_request()
513 struct crypto_async_request *areq; in process_pending_queue() local
574 areq = resume_pentry->areq; in process_pending_queue()
583 callback(-EINPROGRESS, areq, cpt_info); in process_pending_queue()
589 areq = pentry->areq; in process_pending_queue()
602 callback(res_code, areq, cpt_info); in process_pending_queue()

123