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  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:   Mon, 30 Oct 2017 23:51:09 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>,
        netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        Dan Carpenter <dan.carpenter@...cle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eugeniu Rosca <erosca@...adit-jv.com>,
        Kazuya Mizuguchi <kazuya.mizuguchi.ks@...esas.com>,
        Masaru Nagai <masaru.nagai.vx@...esas.com>,
        Niklas Söderlund 
        <niklas.soderlund+renesas@...natech.se>,
        Simon Horman <horms+renesas@...ge.net.au>,
        Yuval Shaia <yuval.shaia@...cle.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] ravb: Use common error handling code in ravb_probe()

Hello!

On 10/28/2017 08:19 PM, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sat, 28 Oct 2017 19:10:08 +0200
> 
> Add a jump target so that a bit of exception handling can be better reused
> at the end of this function.

    Have you actually tried to see if there's any change in the resulting 
object code? I've looked at ARM gcc 4.8.5's output and it didn't really change 
-- gcc was able to optimize these repetitive assignments pretty well...

> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>   drivers/net/ethernet/renesas/ravb_main.c | 32 ++++++++++++++++----------------
>   1 file changed, 16 insertions(+), 16 deletions(-)

    Diffstat also speaks about the futility of this patch.

> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index a8822a756e08..62dbdf7de6cd 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c

> @@ -2226,6 +2222,10 @@ static int ravb_probe(struct platform_device *pdev)
>   	pm_runtime_put(&pdev->dev);
>   	pm_runtime_disable(&pdev->dev);
>   	return error;
> +
> +failure_indication:

    Pretty poor label name -- I would've preferred 'no_irq' or smth...

> +	error = irq;
> +	goto out_release;

    The only good thing is that looking at the assembly, I was able to figure 
out that 'ndev' check at 'out_release' is futile... :-)

[...]

MBR, Sergei

Powered by blists - more mailing lists