Date: Tue, 8 Sep 2015 12:24:39 +0300 From: Solar Designer <solar@...nwall.com> To: john-dev@...ts.openwall.com Subject: Re: Large stack alignment On Tue, Sep 08, 2015 at 01:37:21AM +0200, magnum wrote: > On 2015-09-06 19:55, Solar Designer wrote: > >(...) although ideally we'd have the compiler align the > >stack and then we wouldn't spend any extra registers on this. > > > >More importantly, none of this addresses the "redundant or insufficient" > >aspect. We need to figure it out. > > Our AC is already capable of testing whether arbitrary options like > "-mpreferred-stack-boundary=5" is accepted by the compiler or not. Does > this help? I'm not quite sure why it's called "preferred"? We should check whether -mavx2 possibly already implies -mpreferred-stack-boundary=5. It might. This should help (and possibly already does) prevent our own code from misaligning the stack, but it won't help deal with possible stack misalignment by libraries. The library most relevant to us is libgomp. Hopefully, AVX2-capable gcc has its libgomp built with -mpreferred-stack-boundary=5, but I don't know whether this is the case or not. Also, it'd rely on the stack being aligned when main() starts. Alexander
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.