• Home
  • Raw
  • Download

Lines Matching refs:req

133 int crypto_hash_walk_first(struct ahash_request *req,  in crypto_hash_walk_first()  argument
136 walk->total = req->nbytes; in crypto_hash_walk_first()
143 walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req)); in crypto_hash_walk_first()
144 walk->sg = req->src; in crypto_hash_walk_first()
145 walk->flags = req->base.flags & CRYPTO_TFM_REQ_MASK; in crypto_hash_walk_first()
151 int crypto_ahash_walk_first(struct ahash_request *req, in crypto_ahash_walk_first() argument
154 walk->total = req->nbytes; in crypto_ahash_walk_first()
161 walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req)); in crypto_ahash_walk_first()
162 walk->sg = req->src; in crypto_ahash_walk_first()
163 walk->flags = req->base.flags & CRYPTO_TFM_REQ_MASK; in crypto_ahash_walk_first()
223 static int ahash_save_req(struct ahash_request *req, crypto_completion_t cplt) in ahash_save_req() argument
225 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ahash_save_req()
231 (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? in ahash_save_req()
261 priv->result = req->result; in ahash_save_req()
262 priv->complete = req->base.complete; in ahash_save_req()
263 priv->data = req->base.data; in ahash_save_req()
264 priv->flags = req->base.flags; in ahash_save_req()
272 req->result = PTR_ALIGN((u8 *)priv->ubuf, alignmask + 1); in ahash_save_req()
273 req->base.complete = cplt; in ahash_save_req()
274 req->base.data = req; in ahash_save_req()
275 req->priv = priv; in ahash_save_req()
280 static void ahash_restore_req(struct ahash_request *req, int err) in ahash_restore_req() argument
282 struct ahash_request_priv *priv = req->priv; in ahash_restore_req()
285 memcpy(priv->result, req->result, in ahash_restore_req()
286 crypto_ahash_digestsize(crypto_ahash_reqtfm(req))); in ahash_restore_req()
289 req->result = priv->result; in ahash_restore_req()
291 ahash_request_set_callback(req, priv->flags, in ahash_restore_req()
293 req->priv = NULL; in ahash_restore_req()
299 static void ahash_notify_einprogress(struct ahash_request *req) in ahash_notify_einprogress() argument
301 struct ahash_request_priv *priv = req->priv; in ahash_notify_einprogress()
309 static void ahash_op_unaligned_done(struct crypto_async_request *req, int err) in ahash_op_unaligned_done() argument
311 struct ahash_request *areq = req->data; in ahash_op_unaligned_done()
334 static int ahash_op_unaligned(struct ahash_request *req, in ahash_op_unaligned() argument
339 err = ahash_save_req(req, ahash_op_unaligned_done); in ahash_op_unaligned()
343 err = op(req); in ahash_op_unaligned()
345 (err == -EBUSY && (ahash_request_flags(req) & in ahash_op_unaligned()
349 ahash_restore_req(req, err); in ahash_op_unaligned()
354 static int crypto_ahash_op(struct ahash_request *req, in crypto_ahash_op() argument
357 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in crypto_ahash_op()
360 if ((unsigned long)req->result & alignmask) in crypto_ahash_op()
361 return ahash_op_unaligned(req, op); in crypto_ahash_op()
363 return op(req); in crypto_ahash_op()
366 int crypto_ahash_final(struct ahash_request *req) in crypto_ahash_final() argument
368 return crypto_ahash_op(req, crypto_ahash_reqtfm(req)->final); in crypto_ahash_final()
372 int crypto_ahash_finup(struct ahash_request *req) in crypto_ahash_finup() argument
374 return crypto_ahash_op(req, crypto_ahash_reqtfm(req)->finup); in crypto_ahash_finup()
378 int crypto_ahash_digest(struct ahash_request *req) in crypto_ahash_digest() argument
380 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in crypto_ahash_digest()
385 return crypto_ahash_op(req, tfm->digest); in crypto_ahash_digest()
389 static void ahash_def_finup_done2(struct crypto_async_request *req, int err) in ahash_def_finup_done2() argument
391 struct ahash_request *areq = req->data; in ahash_def_finup_done2()
401 static int ahash_def_finup_finish1(struct ahash_request *req, int err) in ahash_def_finup_finish1() argument
406 req->base.complete = ahash_def_finup_done2; in ahash_def_finup_finish1()
408 err = crypto_ahash_reqtfm(req)->final(req); in ahash_def_finup_finish1()
410 (err == -EBUSY && (ahash_request_flags(req) & in ahash_def_finup_finish1()
415 ahash_restore_req(req, err); in ahash_def_finup_finish1()
419 static void ahash_def_finup_done1(struct crypto_async_request *req, int err) in ahash_def_finup_done1() argument
421 struct ahash_request *areq = req->data; in ahash_def_finup_done1()
437 static int ahash_def_finup(struct ahash_request *req) in ahash_def_finup() argument
439 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ahash_def_finup()
442 err = ahash_save_req(req, ahash_def_finup_done1); in ahash_def_finup()
446 err = tfm->update(req); in ahash_def_finup()
448 (err == -EBUSY && (ahash_request_flags(req) & in ahash_def_finup()
452 return ahash_def_finup_finish1(req, err); in ahash_def_finup()
455 static int ahash_no_export(struct ahash_request *req, void *out) in ahash_no_export() argument
460 static int ahash_no_import(struct ahash_request *req, const void *in) in ahash_no_import() argument