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]
Message-ID: <YZKiovE1D9t17TVe@builder.lan>
Date:   Mon, 15 Nov 2021 12:10:42 -0600
From:   Bjorn Andersson <bjorn.andersson@...aro.org>
To:     Bhupesh Sharma <bhupesh.sharma@...aro.org>
Cc:     linux-arm-msm@...r.kernel.org, linux-crypto@...r.kernel.org,
        bhupesh.linux@...il.com, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, robh+dt@...nel.org, agross@...nel.org,
        herbert@...dor.apana.org.au, davem@...emloft.net,
        stephan@...hold.net, Thara Gopinath <thara.gopinath@...aro.org>
Subject: Re: [PATCH v5 17/22] crypto: qce: Print a failure msg in case
 probe() fails

On Wed 10 Nov 04:59 CST 2021, Bhupesh Sharma wrote:

> Print a failure message (dev_err) in case the qcom qce crypto
> driver probe() fails.
> 
> Cc: Bjorn Andersson <bjorn.andersson@...aro.org>
> Cc: Rob Herring <robh+dt@...nel.org>
> Reviewed-by: Thara Gopinath <thara.gopinath@...aro.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@...aro.org>
> ---
>  drivers/crypto/qce/core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c
> index 98784d63d78c..7c90401a2ef1 100644
> --- a/drivers/crypto/qce/core.c
> +++ b/drivers/crypto/qce/core.c
> @@ -280,6 +280,7 @@ static int qce_crypto_probe(struct platform_device *pdev)
>  err_mem_path_disable:
>  	icc_set_bw(qce->mem_path, 0, 0);
>  err:
> +	dev_err(dev, "%s failed : %d\n", __func__, ret);

There's two possible outcomes of this style of error logging:

1) You came through a code path with a specific error message, so you
will have something that will say:

qce: Some useful error text
qce: qce_crypto_probe failed: -22

2) You came through a code path without a specific error message:

qce: qce_crypto_probe failed: -22


In the first case the second line is just pure spam, in the second case
the bare -22 is typically completely useless - given that there tend to
be just a few commonly used errno values coming from multiple possible
error sources.

As such, no thanks. If you have an error case in qce_crypto_probe() that
doesn't have a good, useful, error message, please fix that.

Regards,
Bjorn

>  	return ret;
>  }
>  
> -- 
> 2.31.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ