[openssl-dev] [openssl.org #4667] Issue with OpenSSL v1.1.0 on AIX with XLC and GCC and -O

Andy Polyakov via RT rt at openssl.org
Fri Sep 2 22:42:17 UTC 2016


> - GCC 6.1.0 is: KO, 64 & 32 bits:
> #   Failed test 'running evp_test evptests.txt'
> #   at ../test/recipes/30-test_evp.t line 18.
> # Looks like you failed 1 test of 1.
> ../test/recipes/30-test_evp.t ..............
> Dubious, test returned 1 (wstat 256, 0x100)
> Failed 1/1 subtests

Phew! Mystery solved! Verify attached patch. Trouble was that vector
ChaCha subroutine relies on its alignment in memory. But on AIX it's
impossible to *control* alignment with desired granularity without
specifying higher alignment for .text segment itself. And .text
directive was missing in chacha-ppc module :-( So it's not exactly
optimizations of ppccap.o that mattered, but its changing size depending
on optimization options that was affecting chacha subroutine's
alignment. It actually *could* be vice versa, i.e. work with
optimizations on and fail without, it's all about a coincidence.


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4667
Please log in as guest with password guest if prompted

-------------- next part --------------
diff --git a/crypto/chacha/asm/chacha-ppc.pl b/crypto/chacha/asm/chacha-ppc.pl
index b978f58..8a54cba 100755
--- a/crypto/chacha/asm/chacha-ppc.pl
+++ b/crypto/chacha/asm/chacha-ppc.pl
@@ -133,6 +133,7 @@ my ($a3,$b3,$c3,$d3)=map(($_&~3)+(($_+1)&3),($a2,$b2,$c2,$d2));
 
 $code.=<<___;
 .machine	"any"
+.text
 
 .globl	.ChaCha20_ctr32_int
 .align	5


More information about the openssl-dev mailing list