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: Wed, 19 Jul 2023 14:29:05 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH] net: delete "<< 1U" cargo-culting

On Tue, Jul 18, 2023 at 12:47:50PM +0200, Paolo Abeni wrote:
> On Sat, 2023-07-15 at 13:19 +0300, Alexey Dobriyan wrote:
> > 6.5.7 ยง3 "Bitwise shift operators" clearly states that
> > 
> >         The type of the result is that of the promoted left operand
> > 
> > All those integer constant suffixes in the right operand are pointless,
> > delete them.
> 
> Indeed. Still this patch is quite invasive and the net benefit looks
> quite marginal - if any at all.

I have all tree converted, this is just net/ part.

Net(!) benefit is more readable code.

> Older compiler could adhere to the standard less strictly or

No, no, no. Unless there is known miscompilation I don't buy this argument.

> macro
> expansion - when the left '<<' operand is a macro argument - could be
> tricky.

But it is easy to verify that it doesn't. In theory someone could do

	__stringify(UDP_MAX_SEGMENTS)

but what are the odds.

> I think we are better of not applying this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ