Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c1b0c2180ff7cd044e3a1474b6ee8d0a@smtp.hushmail.com>
Date: Sun, 6 Sep 2015 15:15:11 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Large stack alignment

On 2015-09-06 13:20, magnum wrote:
> On 2015-09-05 20:48, magnum wrote:
>> On 2015-09-05 04:47, Solar Designer wrote:
>>> Guess not confirmed.  We use buffers on the stack, and they are properly
>>> aligned for 128-bit SIMD.  This is unreliable for AVX2 and above,
>>> though.
>>
>> Are you sure it's unreliable? As far as I can google it, gcc had
>> problems with large alignments but it was fixed long before 4.7, which
>> is the minimum version you need to even build for AVX2.
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16660
>> http://stackoverflow.com/questions/841433/gcc-attribute-alignedx-explanation
>>
>
> So Lei reminded me of this:
> http://www.openwall.com/lists/john-dev/2015/08/24/8
>
> We have an issue for changing all stack allocs using MEM_ALIGN_SIMD to
> align ourselves.

This is fixed in 1bd8d9d. In order to mitigate performance regression I 
inlined a copy of mem_align() in simd-intrinsics.c.

Lei, I also changed definitions of vloadu_emu and vstoreu_emu in 
pseudo_intrinsics.h (also with an inlined function). This might mean a 
significant performance drop. Maybe we should have autoconf figure out 
whether large alignments work, and define some macro.

magnum

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.