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] [day] [month] [year] [list]
Date: Mon, 27 May 2024 22:25:25 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: netdev@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH][CFT][experimental] net/socket.c: use straight
 fdget/fdput (resend)

On Mon, May 27, 2024 at 05:31:16PM +0100, Al Viro wrote:

> Hell knows; let me play with that a bit and let's see what falls out...

gcc optimizer is... interesting:

if (v & 1)
        if (!(v & 3))
                foo();

is *NOT* collapsed into a no-op.  Not even

if (v & 1)
        if (!(v & 1) && !(v & 2))
                foo();

is good enough for it.

if (v & 1)
        if (!(v & 1))
                if (!(v & 2))
                        foo();

is recognized, thankfully, but... WTF?  As far as I can tell,
        if (!(v & 1) && !(v & 2))
gets turned into if (!(v & 3)), and then gcc gets stuck on that.
        if (!(v & 1)) if (!(v & 2))
is turned into the same, but apparently only after it actually
looks at both parts in context of what it knows about the earlier
checks.

clang handles all forms just fine, but gcc does not ;-/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ