lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 10 Jan 2020 08:31:38 +0000
From:   Horia Geanta <horia.geanta@....com>
To:     Iuliana Prodan <iuliana.prodan@....com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Aymen Sghaier <aymen.sghaier@....com>
CC:     "David S. Miller" <davem@...emloft.net>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH v2 08/10] crypto: caam - add crypto_engine support for
 AEAD algorithms

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ