Searched refs:subreq (Results 1 - 8 of 8) sorted by relevance

/linux-4.1.27/crypto/
H A Dchainiv.c52 struct ablkcipher_request *subreq = skcipher_givcrypt_reqctx(req); chainiv_givencrypt() local
56 ablkcipher_request_set_tfm(subreq, skcipher_geniv_cipher(geniv)); chainiv_givencrypt()
57 ablkcipher_request_set_callback(subreq, req->creq.base.flags & chainiv_givencrypt()
61 ablkcipher_request_set_crypt(subreq, req->creq.src, req->creq.dst, chainiv_givencrypt()
69 memcpy(subreq->info, ctx->iv, ivsize); chainiv_givencrypt()
71 err = crypto_ablkcipher_encrypt(subreq); chainiv_givencrypt()
75 memcpy(ctx->iv, subreq->info, ivsize); chainiv_givencrypt()
165 struct ablkcipher_request *subreq = skcipher_givcrypt_reqctx(req); async_chainiv_givencrypt_tail() local
169 memcpy(subreq->info, ctx->iv, ivsize); async_chainiv_givencrypt_tail()
171 ctx->err = crypto_ablkcipher_encrypt(subreq); async_chainiv_givencrypt_tail()
175 memcpy(ctx->iv, subreq->info, ivsize); async_chainiv_givencrypt_tail()
185 struct ablkcipher_request *subreq = skcipher_givcrypt_reqctx(req); async_chainiv_givencrypt() local
187 ablkcipher_request_set_tfm(subreq, skcipher_geniv_cipher(geniv)); async_chainiv_givencrypt()
188 ablkcipher_request_set_callback(subreq, req->creq.base.flags, async_chainiv_givencrypt()
191 ablkcipher_request_set_crypt(subreq, req->creq.src, req->creq.dst, async_chainiv_givencrypt()
241 struct ablkcipher_request *subreq; async_chainiv_do_postponed() local
254 subreq = skcipher_givcrypt_reqctx(req); async_chainiv_do_postponed()
255 subreq->base.flags |= CRYPTO_TFM_REQ_MAY_SLEEP; async_chainiv_do_postponed()
H A Dseqiv.c34 struct ablkcipher_request *subreq = skcipher_givcrypt_reqctx(req); seqiv_complete2() local
44 memcpy(req->creq.info, subreq->info, crypto_ablkcipher_ivsize(geniv)); seqiv_complete2()
47 kfree(subreq->info); seqiv_complete2()
60 struct aead_request *subreq = aead_givcrypt_reqctx(req); seqiv_aead_complete2() local
70 memcpy(req->areq.iv, subreq->iv, crypto_aead_ivsize(geniv)); seqiv_aead_complete2()
73 kfree(subreq->iv); seqiv_aead_complete2()
102 struct ablkcipher_request *subreq = skcipher_givcrypt_reqctx(req); seqiv_givencrypt() local
109 ablkcipher_request_set_tfm(subreq, skcipher_geniv_cipher(geniv)); seqiv_givencrypt()
129 ablkcipher_request_set_callback(subreq, req->creq.base.flags, compl, seqiv_givencrypt()
131 ablkcipher_request_set_crypt(subreq, req->creq.src, req->creq.dst, seqiv_givencrypt()
137 err = crypto_ablkcipher_encrypt(subreq); seqiv_givencrypt()
148 struct aead_request *subreq = aead_givcrypt_reqctx(req); seqiv_aead_givencrypt() local
155 aead_request_set_tfm(subreq, aead_geniv_base(geniv)); seqiv_aead_givencrypt()
175 aead_request_set_callback(subreq, areq->base.flags, compl, data); seqiv_aead_givencrypt()
176 aead_request_set_crypt(subreq, areq->src, areq->dst, areq->cryptlen, seqiv_aead_givencrypt()
178 aead_request_set_assoc(subreq, areq->assoc, areq->assoclen); seqiv_aead_givencrypt()
183 err = crypto_aead_encrypt(subreq); seqiv_aead_givencrypt()
H A Deseqiv.c70 struct ablkcipher_request *subreq; eseqiv_givencrypt() local
85 subreq = (void *)(reqctx->tail + ctx->reqoff); eseqiv_givencrypt()
86 ablkcipher_request_set_tfm(subreq, skcipher_geniv_cipher(geniv)); eseqiv_givencrypt()
108 ablkcipher_request_set_callback(subreq, req->creq.base.flags, compl, eseqiv_givencrypt()
124 ablkcipher_request_set_crypt(subreq, reqctx->src, dst, eseqiv_givencrypt()
138 err = crypto_ablkcipher_encrypt(subreq); eseqiv_givencrypt()
H A Dctr.c35 struct ablkcipher_request subreq CRYPTO_MINALIGN_ATTR;
286 struct ablkcipher_request *subreq = &rctx->subreq; crypto_rfc3686_crypt() local
297 ablkcipher_request_set_tfm(subreq, child); crypto_rfc3686_crypt()
298 ablkcipher_request_set_callback(subreq, req->base.flags, crypto_rfc3686_crypt()
300 ablkcipher_request_set_crypt(subreq, req->src, req->dst, req->nbytes, crypto_rfc3686_crypt()
303 return crypto_ablkcipher_encrypt(subreq); crypto_rfc3686_crypt()
H A Dgcm.c57 struct aead_request subreq; member in struct:crypto_rfc4543_req_ctx
900 struct aead_request *subreq = aead_request_ctx(req); crypto_rfc4106_crypt() local
904 u8 *iv = PTR_ALIGN((u8 *)(subreq + 1) + crypto_aead_reqsize(child), crypto_rfc4106_crypt()
910 aead_request_set_tfm(subreq, child); crypto_rfc4106_crypt()
911 aead_request_set_callback(subreq, req->base.flags, req->base.complete, crypto_rfc4106_crypt()
913 aead_request_set_crypt(subreq, req->src, req->dst, req->cryptlen, iv); crypto_rfc4106_crypt()
914 aead_request_set_assoc(subreq, req->assoc, req->assoclen); crypto_rfc4106_crypt()
916 return subreq; crypto_rfc4106_crypt()
1124 struct aead_request *subreq = &rctx->subreq; crypto_rfc4543_crypt() local
1173 aead_request_set_tfm(subreq, ctx->child); crypto_rfc4543_crypt()
1174 aead_request_set_callback(subreq, req->base.flags, crypto_rfc4543_done, crypto_rfc4543_crypt()
1176 aead_request_set_crypt(subreq, cipher, cipher, enc ? 0 : authsize, iv); crypto_rfc4543_crypt()
1177 aead_request_set_assoc(subreq, assoc, assoclen); crypto_rfc4543_crypt()
1179 return subreq; crypto_rfc4543_crypt()
1199 struct aead_request *subreq; crypto_rfc4543_encrypt() local
1208 subreq = crypto_rfc4543_crypt(req, true); crypto_rfc4543_encrypt()
1209 err = crypto_aead_encrypt(subreq); crypto_rfc4543_encrypt()
H A Dccm.c680 struct aead_request *subreq = aead_request_ctx(req); crypto_rfc4309_crypt() local
684 u8 *iv = PTR_ALIGN((u8 *)(subreq + 1) + crypto_aead_reqsize(child), crypto_rfc4309_crypt()
693 aead_request_set_tfm(subreq, child); crypto_rfc4309_crypt()
694 aead_request_set_callback(subreq, req->base.flags, req->base.complete, crypto_rfc4309_crypt()
696 aead_request_set_crypt(subreq, req->src, req->dst, req->cryptlen, iv); crypto_rfc4309_crypt()
697 aead_request_set_assoc(subreq, req->assoc, req->assoclen); crypto_rfc4309_crypt()
699 return subreq; crypto_rfc4309_crypt()
/linux-4.1.27/fs/nfs/
H A Dpagelist.c1033 struct nfs_page *subreq; __nfs_pageio_add_request() local
1039 subreq = req; __nfs_pageio_add_request()
1040 bytes_left = subreq->wb_bytes; __nfs_pageio_add_request()
1041 offset = subreq->wb_offset; __nfs_pageio_add_request()
1042 pgbase = subreq->wb_pgbase; __nfs_pageio_add_request()
1045 if (!nfs_pageio_do_add_request(desc, subreq)) { __nfs_pageio_add_request()
1047 WARN_ON_ONCE(subreq->wb_bytes != bytes_left); __nfs_pageio_add_request()
1048 WARN_ON_ONCE(subreq->wb_offset != offset); __nfs_pageio_add_request()
1049 WARN_ON_ONCE(subreq->wb_pgbase != pgbase); __nfs_pageio_add_request()
1058 /* retry add_request for this subreq */ __nfs_pageio_add_request()
1064 WARN_ON_ONCE(subreq->wb_bytes + subreq->wb_pgbase > PAGE_SIZE); __nfs_pageio_add_request()
1065 WARN_ON_ONCE(subreq->wb_bytes > bytes_left); __nfs_pageio_add_request()
1066 WARN_ON_ONCE(subreq->wb_bytes == 0); __nfs_pageio_add_request()
1068 bytes_left -= subreq->wb_bytes; __nfs_pageio_add_request()
1069 offset += subreq->wb_bytes; __nfs_pageio_add_request()
1070 pgbase += subreq->wb_bytes; __nfs_pageio_add_request()
1073 subreq = nfs_create_request(req->wb_context, __nfs_pageio_add_request()
1075 subreq, pgbase, bytes_left); __nfs_pageio_add_request()
1076 if (IS_ERR(subreq)) __nfs_pageio_add_request()
1078 nfs_lock_request(subreq); __nfs_pageio_add_request()
1079 subreq->wb_offset = offset; __nfs_pageio_add_request()
1080 subreq->wb_index = req->wb_index; __nfs_pageio_add_request()
1087 desc->pg_error = PTR_ERR(subreq); __nfs_pageio_add_request()
H A Dwrite.c370 struct nfs_page *subreq = destroy_list; nfs_destroy_unlinked_subrequests() local
372 destroy_list = (subreq->wb_this_page == old_head) ? nfs_destroy_unlinked_subrequests()
373 NULL : subreq->wb_this_page; nfs_destroy_unlinked_subrequests()
375 WARN_ON_ONCE(old_head != subreq->wb_head); nfs_destroy_unlinked_subrequests()
378 subreq->wb_head = subreq; nfs_destroy_unlinked_subrequests()
379 subreq->wb_this_page = subreq; nfs_destroy_unlinked_subrequests()
381 /* subreq is now totally disconnected from page group or any nfs_destroy_unlinked_subrequests()
383 nfs_unlock_request(subreq); nfs_destroy_unlinked_subrequests()
385 if (!test_bit(PG_TEARDOWN, &subreq->wb_flags)) { nfs_destroy_unlinked_subrequests()
389 nfs_page_group_clear_bits(subreq); nfs_destroy_unlinked_subrequests()
392 if (test_and_clear_bit(PG_INODE_REF, &subreq->wb_flags)) nfs_destroy_unlinked_subrequests()
393 nfs_release_request(subreq); nfs_destroy_unlinked_subrequests()
397 WARN_ON_ONCE(test_bit(PG_CLEAN, &subreq->wb_flags)); nfs_destroy_unlinked_subrequests()
402 nfs_page_group_clear_bits(subreq); nfs_destroy_unlinked_subrequests()
403 nfs_free_request(subreq); nfs_destroy_unlinked_subrequests()
431 struct nfs_page *head, *subreq; nfs_lock_and_join_requests() local
472 subreq = head; nfs_lock_and_join_requests()
478 if (subreq->wb_offset == (head->wb_offset + total_bytes)) { nfs_lock_and_join_requests()
480 total_bytes += subreq->wb_bytes; nfs_lock_and_join_requests()
481 } else if (WARN_ON_ONCE(subreq->wb_offset < head->wb_offset || nfs_lock_and_join_requests()
482 ((subreq->wb_offset + subreq->wb_bytes) > nfs_lock_and_join_requests()
489 if (!nfs_lock_request(subreq)) { nfs_lock_and_join_requests()
493 subreq, nonblock); nfs_lock_and_join_requests()
501 subreq = subreq->wb_this_page; nfs_lock_and_join_requests()
502 } while (subreq != head); nfs_lock_and_join_requests()
506 subreq = head; nfs_lock_and_join_requests()
508 nfs_clear_request_commit(subreq); nfs_lock_and_join_requests()
509 subreq = subreq->wb_this_page; nfs_lock_and_join_requests()
510 } while (subreq != head); nfs_lock_and_join_requests()

Completed in 337 milliseconds