FS#15454 - [openssl] i686 pkg compiled with SSE2 code
Attached to Project:
Arch Linux
Opened by Gerardo Exequiel Pozzi (djgera) - Thursday, 09 July 2009, 07:07 GMT
Last edited by Roman Kyrylych (Romashka) - Thursday, 09 July 2009, 19:25 GMT
Opened by Gerardo Exequiel Pozzi (djgera) - Thursday, 09 July 2009, 07:07 GMT
Last edited by Roman Kyrylych (Romashka) - Thursday, 09 July 2009, 19:25 GMT
|
Details
Description: libcrypto.so.0.9.8 contains many SSE2
instructions in openssl-0.9.8k-2.
Solution: add to ./config the flag "no-sse2" $ objdump -d /usr/lib/libcrypto.so.0.9.8 | grep "movdq.*xmm" |
This task depends upon
Closed by Roman Kyrylych (Romashka)
Thursday, 09 July 2009, 19:25 GMT
Reason for closing: Not a bug
Additional comments about closing: SSE2 are detected at runtime.
Thursday, 09 July 2009, 19:25 GMT
Reason for closing: Not a bug
Additional comments about closing: SSE2 are detected at runtime.
$ gcc -I.. -I../.. -I../../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -c -o dso_dlfcn.o dso_dlfcn.c
dso_dlfcn.c: In function 'dlfcn_bind_func':
dso_dlfcn.c:258: warning: dereferencing pointer 'tsym.23' does break strict-aliasing rules
dso_dlfcn.c:258: note: initialized from here
$ md5sum dso_dlfcn.o
168dbe85ffe93dd5cca2e86b0e81327a dso_dlfcn.o
$ gcc -I.. -I../.. -I../../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -fno-strict-aliasing -c -o dso_dlfcn.o dso_dlfcn.c
$ md5sum dso_dlfcn.o
168dbe85ffe93dd5cca2e86b0e81327a dso_dlfcn.o
no-sse2 Exclude SSE2 code pathes. Normally SSE2 extention is
detected at run-time, but the decision whether or not the
machine code will be executed is taken solely on CPU
capability vector. This means that if you happen to run OS
kernel which does not support SSE2 extension on Intel P4
processor, then your application might be exposed to
"illegal instruction" exception. There might be a way
to enable support in kernel, e.g. FreeBSD kernel can be
compiled with CPU_ENABLE_SSE, and there is a way to
disengage SSE2 code pathes upon application start-up,
but if you aim for wider "audience" running such kernel,
consider no-sse2. Both 386 and no-asm options above imply
no-sse2.
Anyway I verified on emulated pentium2(qemu) tracing if the function sha512_block_sse2() is executed on "openssl sha -sha512", and no execution is made :)
PS: Good patch for aliasing ;)
Closing...