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:   Sat, 30 Mar 2019 15:37:41 +0530
From:   Mukesh Ojha <mojha@...eaurora.org>
To:     Yue Haibing <yuehaibing@...wei.com>, herbert@...dor.apana.org.au,
        davem@...emloft.net, shawnguo@...nel.org, s.hauer@...gutronix.de,
        kernel@...gutronix.de, festevam@...il.com, linux-imx@....com
Cc:     linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH -next] crypto: mxs-dcp - return errcode in
 mxs_dcp_aes_enqueue and dcp_sha_update_fx


On 3/30/2019 11:22 AM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@...wei.com>
>
> 'err' is set in err path, but it's not returned to callers.
> Don't always return -EINPROGRESS, return err.


how this one sounds ?

'err' is set in error path inside crypto_enqueue_request(), but this is not getting
returned upstream but, always EINPROGRESS. Fix this by returning appropriate error value.


>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>

Reviewed-by: Mukesh Ojha <mojha@...eaurora.org>

Cheers,
-Mukesh


> ---
>   drivers/crypto/mxs-dcp.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
> index a2105cf..494cfc4 100644
> --- a/drivers/crypto/mxs-dcp.c
> +++ b/drivers/crypto/mxs-dcp.c
> @@ -471,7 +471,7 @@ static int mxs_dcp_aes_enqueue(struct ablkcipher_request *req, int enc, int ecb)
>   
>   	wake_up_process(sdcp->thread[actx->chan]);
>   
> -	return -EINPROGRESS;
> +	return ret;
>   }
>   
>   static int mxs_dcp_aes_ecb_decrypt(struct ablkcipher_request *req)
> @@ -797,7 +797,7 @@ static int dcp_sha_update_fx(struct ahash_request *req, int fini)
>   	wake_up_process(sdcp->thread[actx->chan]);
>   	mutex_unlock(&actx->mutex);
>   
> -	return -EINPROGRESS;
> +	return ret;
>   }
>   
>   static int dcp_sha_update(struct ahash_request *req)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ