Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 15 Aug 2015 16:57:22 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: testing without SIMD, and different SIMD

Kai -

You'll need to re-do all of your tests without SIMD, as well as continue
running them in default, SIMD-enabled builds, and in different
SIMD-enabled builds.  This exposes different code paths, and we need to
have all code paths tested for possible bugs.  I think you'll find more
bugs that way.

On x86_64, this achieves a different SIMD-enabled build:

./configure --disable-native-tests

Target CPU ................................. x86_64 SSE2, 64-bit LE

SSE2 instead of AVX.  Probably won't expose more bugs, but worth trying.

This achieves a build using MMX... and since it's so obscure on x86_64,
I guess it might not even build, but is worth trying:

./configure --disable-native-tests CFLAGS='-O2 -mno-sse2'

Target CPU ................................. x86_64 MMX, 64-bit LE

This achieves a SIMD-less build, which should in fact build and will
likely expose plenty of bugs that you haven't found so far:

./configure --disable-native-tests CFLAGS='-O2 -mno-sse2 -mno-mmx'

Target CPU ................................. x86_64, 64-bit LE

This should produce a 32-bit yet fully SIMD-enabled build, and it should
in fact build and expose more bugs too:

setarch i686
./configure

Target CPU ................................. i686 AVX, 64-bit LE

This disables AVX:

setarch i686
./configure --disable-native-tests

Target CPU ................................. i686 SSE2, 64-bit LE

This further disables SSE*, but leaves MMX (so 64-bit instead of
128-bit vectors).  Should build and expose more bugs:

setarch i686
./configure --disable-native-tests CFLAGS='-O2 -mno-sse2'

Target CPU ................................. i686 MMX, 64-bit LE

This produces a 32-bit SIMD-less build.  Should build and expose more bugs:

setarch i686
./configure --disable-native-tests CFLAGS='-O2 -mno-sse2 -mno-mmx'

Target CPU ................................. i686, 64-bit LE

In fact, I see a fatal issue right away: it says 64-bit on all of these
i686 targets, but they are 32-bit.

Scrolling up, I see:

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
[...]
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of int *... 8
checking size of void *... 8
configure: Testing tool-chain's CPU features
checking for MMX... no
checking for arch.h alternative... x86-any.h
checking for 32/64 bit... 64-bit
checking for extra ASFLAGS... None needed
checking for X32 ABI... no
checking for byte ordering according to target triple... little

Weird stuff.  Maybe we need to add -m32 to CFLAGS.  Then I get:

-sh-4.1$ ./configure --disable-native-tests CFLAGS='-O2 -m32 -mno-sse2 -mno-mmx'
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
[...]
checking size of short... 2
checking size of int... 4
checking size of long... 4
checking size of long long... 8
checking size of int *... 4
checking size of void *... 4
configure: Testing tool-chain's CPU features
checking for MMX... no
checking for arch.h alternative... x86-any.h
checking for 32/64 bit... 32-bit
checking for extra ASFLAGS... None needed
checking for X32 ABI... no

but it fails at:

checking for openssl/opensslv.h... yes
checking for SSL_library_init in -lssl... no

Looks like I need to install 32-bit OpenSSL development package, and
then we'll need to include -m32 on those last 4 ./configure's I
suggested, in addition to "setarch i686".

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.