lkml.org 
[lkml]   [2020]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 08/10] crypto: caam - add crypto_engine support for AEAD algorithms
Date
On 1/3/2020 3:04 AM, Iuliana Prodan wrote:
> +struct caam_aead_req_ctx {
> + struct aead_edesc *edesc;
> + void (*aead_op_done)(struct device *jrdev, u32 *desc, u32 err,
> + void *context);
Similar with skcipher, aead_op_done is not needed since aead_crypt_done
is the only callback used.

> +static int aead_enqueue_req(struct device *jrdev, u32 *desc,
> + void (*cbk)(struct device *jrdev, u32 *desc,
> + u32 err, void *context),
> + struct aead_request *req, struct aead_edesc *edesc)
cbk parameter is not used.

> +{
> + struct caam_drv_private_jr *jrpriv = dev_get_drvdata(jrdev);
> + int ret;
> +
> + if (req->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG)
> + return crypto_transfer_aead_request_to_engine(jrpriv->engine,
> + req);
Resources leak in case of failure.

> + else
> + ret = caam_jr_enqueue(jrdev, desc, aead_crypt_done,
> + &edesc->jrentry);
Need to justify why only some requests are transferred to crypto engine.

Horia

\
 
 \ /
  Last update: 2020-01-10 09:33    [W:0.155 / U:4.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site