I've encountered following problem yesterday our automated tests for ccgost engine begin to fail on all x86 platforms, but work flawlessly on SPARC and AMD64.
Result is same on half of dozen different linux distributions, which use
various 3.x or 4.x versions of gcc and three FreeBSD (4.x, 5.x and 6.x) and three Solaris x86 (8, 9 and 10).

If I manually recompile with -O2 instead of -O3, problem persists.
If I recompile with no-asm, problem goes away.

Tests included in OpenSSL distrubution (invoked via make test)
pass, so it seems that BIGNUM library as well as elliptic curve library
should work. Probably this means that test suite is insufficient.

...

I haven't yet investigated recent commits which can be related with
assembler code.
May be somebody, more experienced with OpenSSL assembler code and GCC
optimisation can give me some clue, where to search for problem?

Perhaps ccgost is using the BIGNUM library in a way that other routines don't
and that is triggering a problem.
I'd try using 0.9.9 from an earlier date and see if you can find when the
problem first occurred possibly narrowing it down to which change triggered
this.

Say the earliest snapshot on openssl.dev then if that still fails an older
version using rsync/cvs.

crypto/bn/asm/x86-mont.pl was heavily modified recently... As alternative to pulling down whole snapshots you can simply try to replace this particular file with earlier versions from http://cvs.openssl.org/rlog?f=openssl/crypto/bn/asm/x86-mont.pl. If it turns to be culprit, then note that there are two code pathes, sse2 and integer-only, the latter has separate squaring procedure, and we have to figure out which one fails... To switch off squaring procedure, comment out '&jz (&label("bn_sqr_mont"));' line #273. To switch off integer-only path altogether replace 'if (0)' around line #248 with 'if (1)'. You mention that you test Solaris x86 8, where sse2 is not an option [kernel does not support it]. Do you compile sse2 support on other platforms? A.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to