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: <CALCETrWHdra-Po0rNrHn-cV2G=AM2pWR45rRf4t2RZfQR8Lqjg@mail.gmail.com>
Date:   Tue, 7 Mar 2017 09:59:44 -0800
From:   Andy Lutomirski <luto@...capital.net>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Josh Poimboeuf <jpoimboe@...hat.com>, Pavel Machek <pavel@....cz>,
        kernel list <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Brian Gerst <brgerst@...il.com>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        Peter Anvin <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: v4.10: kernel stack frame pointer .. has bad value (null)

On Tue, Mar 7, 2017 at 9:52 AM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Tue, Mar 7, 2017 at 9:38 AM, Josh Poimboeuf <jpoimboe@...hat.com> wrote:
>>
>> So I'm thinking we should have -maccumulate-outgoing-args always enabled
>> on x86_32 just like we already do on x86_64.
>
> Ugh. I realize we have workarounds for bugs, but I think
> -maccumulate-outgoing-args is nasty. It just generates worse code by
> avoiding the much nicer push/pop sequences, afaik.
>
> On x86-64 it's not such a big deal, because we pass the first six
> arguments in registers anyway, so the arguments on the stack is a
> fairly unusual special case.
>
> But on x86-32, we only have three argument registers, so this
> braindamage is potentially worse.
>
> I guess we already do this in most situations due to the gcc bugs, but
> I do think it's sad that we would do it for our _own_ bugs too.
>

Is it our bug or a gcc bug?  I would have thought
-fno-omit-frame-pointer meant that the call-frame-to-return-address
offset should be constant and -fomit-frame-pointer meant "do
whatever".

Also, maybe I'm missing something, but does gcc's code even allow the
function to return sensibly?  It could do it by a nasty calculation
involving backing out the old esp from edi, but that seems quite
overcomplicated.

--Andy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ