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: <CAGRGNgUV6Dq6ZR9bcgomzj1PMQj4vLq9qJCy0dxVd0vQoPWYXA@mail.gmail.com>
Date: Sun, 13 Apr 2025 17:45:56 +1000
From: Julian Calaby <julian.calaby@...il.com>
To: Markus Elfring <Markus.Elfring@....de>
Cc: Andre Przywara <andre.przywara@....com>, Ovidiu Panait <ovidiu.panait.oss@...il.com>, 
	linux-sunxi@...ts.linux.dev, linux-crypto@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, Chen-Yu Tsai <wens@...e.org>, 
	Corentin Labbe <clabbe.montjoie@...il.com>, "David S. Miller" <davem@...emloft.net>, 
	Herbert Xu <herbert@...dor.apana.org.au>, Jernej Skrabec <jernej.skrabec@...il.com>, 
	Samuel Holland <samuel@...lland.org>, LKML <linux-kernel@...r.kernel.org>, 
	Julia Lawall <julia.lawall@...ia.fr>
Subject: Re: crypto: sun8i-ce-hash - Refine exception handling in sun8i_ce_hash_run()

Hi Markus,

On Wed, Apr 9, 2025 at 10:47 PM Markus Elfring <Markus.Elfring@....de> wrote:
>
> >> Two if branches contained duplicate source code.
> >> Thus avoid the specification of repeated error code assignments by using
> >> additional labels instead.
> …
> > Now there is one rather opaque label it goes to, so a reader doesn't see
> > the error code immediately. And it really just saves one line per case
> > here. …
> I imagine that such a code refinement can occasionally matter.

Just because you imagine that such a code refinement might matter,
doesn't mean it's actually useful.

1. this is making the code significantly less readable to save 1 line.
2. gotos into control blocks are weird at best and problematic and
confusing at worst. There's a reason why nobody writes code like this.
3. this sort of tail merging is something a compiler would apply
automatically when optimising for size and it can do a much better job
of this than you can.

I note that you said you did this using the Coccinelle software. Is
the semantic patch something you're trying to get upstream at part of
coccicheck? If so, could you please get that semantic patch merged
before posting these patches?

Thanks,

-- 
Julian Calaby

Email: julian.calaby@...il.com
Profile: http://www.google.com/profiles/julian.calaby/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ