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:	Sun, 5 Jul 2015 13:01:35 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Jan Kara <jack@...e.cz>
Cc:	Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	the arch/x86 maintainers <x86@...nel.org>
Subject: Re: Non-booting current Linus' tree

On 07/03/2015 02:40 PM, Linus Torvalds wrote:
> On Fri, Jul 3, 2015 at 8:23 AM, Jan Kara <jack@...e.cz> wrote:
>>
>> Because the address isn't 32-byte aligned (which I assume is the
>> requirement from looking into the code). So clearly my gcc messed up and
>> miscompiled the thing by ignoring the alignment attribute.
> 
> Well, it's probably a mistake to begin with to expect gcc to get stack
> alignment right. Especially since we tell gcc to not align the stack
> as much as it usually wants to with -mpreferred-stack-boundary=2.
> 

Are you sure?

The 64-bit part of arch/x86/Makefile contains:

        # Use -mpreferred-stack-boundary=3 if supported.
        KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3)

but make V=1 isn't showing -mpreferred-stack-boundary=3.  This may be
because:

error: -mpreferred-stack-boundary=3 is not between 4 and 12
 extern int bar(const char *);
 ^

I found:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383

and, indeed, -mno-sse -mpreferred-stack-boundary=3 is accepted.  This
make me think that the makefile is broken -- cc-option isn't working
because it doesn't check -mpreferred-stack-boundary in conjunction with
-mno-sse.

Given that -mpreferred-stack-boundary=3 doesn't appear to being set, I
think this is really our bug: our asm code makes no effort to align the
stack to a 16-byte boundary as required by the ABI, and we're not
overriding the ABI correctly.

I'll send a patch for the Makefile issue.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ