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-=wgHFSTuANT3jXsw1EtzdHQe-XQtWQACzeFxn2BEBzX-gA@mail.gmail.com>
Date:   Fri, 20 Oct 2023 12:43:56 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Andy Shevchenko <andriy.shevchenko@...el.com>
Cc:     Baokun Li <libaokun1@...wei.com>,
        Josh Poimboeuf <jpoimboe@...nel.org>, Jan Kara <jack@...e.cz>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        Ferry Toth <ftoth@...londelft.nl>,
        linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: Re: [GIT PULL] ext2, quota, and udf fixes for 6.6-rc1

On Fri, 20 Oct 2023 at 11:29, Andy Shevchenko
<andriy.shevchenko@...el.com> wrote:
>
> I'll reply to this with the attached object file, I assume it won't go to the
> mailing list, but should be available in your mailbox.

Honestly, both cases (that function gets inlined twice) look
*identical* from a quick look, apart from obviously the extra call to
__quota_error().

I might be missing something, but this most definitely is not a "gcc
ends up creating very different code when it doesn't need to
synchronize around the call" thing.

So a compiler issue looks very unlikely. No absolute guarantees - I
didn't do *that* kind of walk-through instruction by instruction - but
the results actually seem to line up perfectly.

Even register allocation didn't change, making the compare between #if
0 and without rather easy.

There's one extra spill/reload due to the call in the "non-#if0" case,
and that actually made me look twice (because it spilled %eax, and
then reloaded it as %rcx), but it turns that %eax/%ecx had the same
value at the time of the spill, so even that was not a "real"
difference.

So I will claim that no, it's not the compiler. It's some unrelated
subtle timing, or possibly just a random code layout issue (because
the code addresses do obviously change).

                    Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ