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: <CAHk-=whLcr11D28vu2NotZYn3GNH6BCTK57Zw4d4v7eut39z=g@mail.gmail.com>
Date: Thu, 25 Jul 2024 10:02:45 -0700
From: Linus Torvalds <torvalds@...uxfoundation.org>
To: David Laight <David.Laight@...lab.com>
Cc: Arnd Bergmann <arnd@...nel.org>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Matthew Wilcox <willy@...radead.org>, 
	Christoph Hellwig <hch@...radead.org>, Andrew Morton <akpm@...ux-foundation.org>, 
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, 
	Dan Carpenter <dan.carpenter@...aro.org>, "Jason A . Donenfeld" <Jason@...c4.com>, 
	"pedro.falcato@...il.com" <pedro.falcato@...il.com>, Mateusz Guzik <mjguzik@...il.com>, 
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 4/7] minmax: Simplify signedness check

On Thu, 25 Jul 2024 at 02:01, David Laight <David.Laight@...lab.com> wrote:
>
> The condition is '>= 0' so it doesn't matter if it is '1' or '0'.

Yes, but that's because the whole conditional is so inexplicably complex.

But the explanation is:

> That gives a 'comparison of unsigned type against 0 is always true' warning.
> (The compiler generates that for code in the unused branches of both
> __builtin_choose_expr() and _Generic().)
> Moving the comparison to the outer level stops all such compiler warnings.

Christ. This whole series is a nightmare of "add complexity to deal
with stupid issues".

But the kernel test robot clearly found even more issues.

I think we need to just go back to the old code. It was stupid and
limited and caused us to have to be more careful about types than was
strictly necessary.

But it was also about a million times simpler, and didn't cause build
time regressions.

             Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ