Date: Fri, 21 Aug 2015 11:55:12 +0200 From: Frank Dittrich <frank.dittrich@...lbox.org> To: john-dev@...ts.openwall.com Subject: Re: Unaligned access (was: JtR on ARM) On 08/21/2015 11:44 AM, Lei Zhang wrote: > I just update a bunch of formats to avoid unaligned accesses when ARCH_ALLOWS_UNALIGNED = 0. All unaligned accesses observed so far happen in set_key(char *key, int), where 'key' might be cast to an int-type pointer. To avoid unaligned access, I create a buffer that is properly aligned, strcpy key to that buffer and then use this buffer as replacement. It is questionable which kind of overhead is higher: unaligned access or redundant 'strcpy's. I tested it on Power, and here's the result: So far, when ./configure --enable-ubsan is used, we add -fno-sanitize=alignment, because on x86 we would get tons of false positives. You might just remove that -fno-sanitize=alignment for your ARM tests. If you want to see warnings and habe libubsan installed, you can also drop -fsanitize-undefined-trap-on-error. If that helps, you might want to improve the autoconfig, so that for archs with ARCH_ALLOWS_UNALIGNED = 0 unaligned access is treated as undefined behavior in --enable-ubsan builds. Frank
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.