• Home
  • Raw
  • Download

Lines Matching refs:req

117 int crypto_hash_walk_first(struct ahash_request *req,  in crypto_hash_walk_first()  argument
120 walk->total = req->nbytes; in crypto_hash_walk_first()
125 walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req)); in crypto_hash_walk_first()
126 walk->sg = req->src; in crypto_hash_walk_first()
127 walk->flags = req->base.flags; in crypto_hash_walk_first()
193 static void ahash_op_unaligned_finish(struct ahash_request *req, int err) in ahash_op_unaligned_finish() argument
195 struct ahash_request_priv *priv = req->priv; in ahash_op_unaligned_finish()
201 memcpy(priv->result, req->result, in ahash_op_unaligned_finish()
202 crypto_ahash_digestsize(crypto_ahash_reqtfm(req))); in ahash_op_unaligned_finish()
207 static void ahash_op_unaligned_done(struct crypto_async_request *req, int err) in ahash_op_unaligned_done() argument
209 struct ahash_request *areq = req->data; in ahash_op_unaligned_done()
219 static int ahash_op_unaligned(struct ahash_request *req, in ahash_op_unaligned() argument
222 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ahash_op_unaligned()
229 (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? in ahash_op_unaligned()
234 priv->result = req->result; in ahash_op_unaligned()
235 priv->complete = req->base.complete; in ahash_op_unaligned()
236 priv->data = req->base.data; in ahash_op_unaligned()
238 req->result = PTR_ALIGN((u8 *)priv->ubuf, alignmask + 1); in ahash_op_unaligned()
239 req->base.complete = ahash_op_unaligned_done; in ahash_op_unaligned()
240 req->base.data = req; in ahash_op_unaligned()
241 req->priv = priv; in ahash_op_unaligned()
243 err = op(req); in ahash_op_unaligned()
244 ahash_op_unaligned_finish(req, err); in ahash_op_unaligned()
249 static int crypto_ahash_op(struct ahash_request *req, in crypto_ahash_op() argument
252 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in crypto_ahash_op()
255 if ((unsigned long)req->result & alignmask) in crypto_ahash_op()
256 return ahash_op_unaligned(req, op); in crypto_ahash_op()
258 return op(req); in crypto_ahash_op()
261 int crypto_ahash_final(struct ahash_request *req) in crypto_ahash_final() argument
263 return crypto_ahash_op(req, crypto_ahash_reqtfm(req)->final); in crypto_ahash_final()
267 int crypto_ahash_finup(struct ahash_request *req) in crypto_ahash_finup() argument
269 return crypto_ahash_op(req, crypto_ahash_reqtfm(req)->finup); in crypto_ahash_finup()
273 int crypto_ahash_digest(struct ahash_request *req) in crypto_ahash_digest() argument
275 return crypto_ahash_op(req, crypto_ahash_reqtfm(req)->digest); in crypto_ahash_digest()
279 static void ahash_def_finup_finish2(struct ahash_request *req, int err) in ahash_def_finup_finish2() argument
281 struct ahash_request_priv *priv = req->priv; in ahash_def_finup_finish2()
287 memcpy(priv->result, req->result, in ahash_def_finup_finish2()
288 crypto_ahash_digestsize(crypto_ahash_reqtfm(req))); in ahash_def_finup_finish2()
293 static void ahash_def_finup_done2(struct crypto_async_request *req, int err) in ahash_def_finup_done2() argument
295 struct ahash_request *areq = req->data; in ahash_def_finup_done2()
305 static int ahash_def_finup_finish1(struct ahash_request *req, int err) in ahash_def_finup_finish1() argument
310 req->base.complete = ahash_def_finup_done2; in ahash_def_finup_finish1()
311 req->base.flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; in ahash_def_finup_finish1()
312 err = crypto_ahash_reqtfm(req)->final(req); in ahash_def_finup_finish1()
315 ahash_def_finup_finish2(req, err); in ahash_def_finup_finish1()
319 static void ahash_def_finup_done1(struct crypto_async_request *req, int err) in ahash_def_finup_done1() argument
321 struct ahash_request *areq = req->data; in ahash_def_finup_done1()
331 static int ahash_def_finup(struct ahash_request *req) in ahash_def_finup() argument
333 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ahash_def_finup()
339 (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? in ahash_def_finup()
344 priv->result = req->result; in ahash_def_finup()
345 priv->complete = req->base.complete; in ahash_def_finup()
346 priv->data = req->base.data; in ahash_def_finup()
348 req->result = PTR_ALIGN((u8 *)priv->ubuf, alignmask + 1); in ahash_def_finup()
349 req->base.complete = ahash_def_finup_done1; in ahash_def_finup()
350 req->base.data = req; in ahash_def_finup()
351 req->priv = priv; in ahash_def_finup()
353 return ahash_def_finup_finish1(req, tfm->update(req)); in ahash_def_finup()
356 static int ahash_no_export(struct ahash_request *req, void *out) in ahash_no_export() argument
361 static int ahash_no_import(struct ahash_request *req, const void *in) in ahash_no_import() argument