Date: Sun, 17 Nov 2013 10:52:43 +0100 From: Berislav Purgar <bpurgar@gmail.com> To: freebsd-security@freebsd.org Subject: openssl padlock problem ? Message-ID: <CAAUsrB4gjJdNfvXuJbBGRz-=8iat2R0auc8ywWDgMwPANSd3pQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello i have VIA eden cpu and problem with padlock .. system is freebsd 10-beta2 on igel 3/4 (via eden 600MHz cpu) .. when i build openssl with padlock and i386 (not 486+) openssl don't find libpadlock (it doesent build it).. root@igel:~ # /usr/local/bin/openssl WARNING: can't open config file: /usr/local/openssl/openssl.cnf OpenSSL> engine padlock 675466668:error:260B606D:engine routines:DYNAMIC_LOAD:init failed:eng_dyn.c:521: 675466668:error:2606A074:engine routines:ENGINE_by_id:no such engine:eng_list.c:417:id=padlock OpenSSL> quit root@igel:~ # ls -al /usr/local/lib/engines total 280 drwxr-xr-x 2 root wheel 512 Nov 17 03:33 . drwxr-xr-x 11 root wheel 4608 Nov 17 03:33 .. -r-xr-xr-x 1 root wheel 18341 Nov 17 03:33 lib4758cca.so -r-xr-xr-x 1 root wheel 18309 Nov 17 03:33 libaep.so -r-xr-xr-x 1 root wheel 13976 Nov 17 03:33 libatalla.so -r-xr-xr-x 1 root wheel 3929 Nov 17 03:33 libcapi.so -r-xr-xr-x 1 root wheel 24282 Nov 17 03:33 libchil.so -r-xr-xr-x 1 root wheel 20411 Nov 17 03:33 libcswift.so -r-xr-xr-x 1 root wheel 3928 Nov 17 03:33 libgmp.so -r-xr-xr-x 1 root wheel 99336 Nov 17 03:33 libgost.so -r-xr-xr-x 1 root wheel 11917 Nov 17 03:33 libnuron.so -r-xr-xr-x 1 root wheel 3932 Nov 17 03:33 libpadlock.so -r-xr-xr-x 1 root wheel 24389 Nov 17 03:33 libsureware.so -r-xr-xr-x 1 root wheel 18603 Nov 17 03:33 libubsec.so root@igel:~ # this is build for i386 and here is build for i486+ where i got problem that openssl crash with ilegal istruction but padlock is supported .. root@igel:~ # /usr/local/bin/openssl WARNING: can't open config file: /usr/local/openssl/openssl.cnf OpenSSL> engine padlock (padlock) VIA PadLock: RNG ACE2 PHE PMM OpenSSL> quit root@igel:~ # /usr/local/bin/openssl speed -evp aes-128-cbc -engine padlock WARNING: can't open config file: /usr/local/openssl/openssl.cnf engine "padlock" set. Doing aes-128-cbc for 3s on 16 size blocks: 5699935 aes-128-cbc's in 2.99s Doing aes-128-cbc for 3s on 64 size blocks: 4724568 aes-128-cbc's in 2.99s Doing aes-128-cbc for 3s on 256 size blocks: 2744851 aes-128-cbc's in 2.98s Doing aes-128-cbc for 3s on 1024 size blocks: 1023765 aes-128-cbc's in 2.98s Doing aes-128-cbc for 3s on 8192 size blocks: 146337 aes-128-cbc's in 2.93s Illegal instruction root@igel:~ # Illegal instruction root@igel:~ # dmesg | more Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.0-BETA2 #0 r257419: Thu Oct 31 17:21:52 UTC 2013 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 CPU: VIA Eden Processor 600MHz (598.52-MHz 686-class CPU) Origin = "CentaurHauls" Id = 0x6d0 Family = 0x6 Model = 0xd Stepping = 0 Features=0xa7c9b9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,CMOV,PAT,CLFLUSH,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE> Features2=0x4181<SSE3,EST,TM2,xTPR> AMD Features=0x100000<NX> VIA Padlock Features=0xffcc<RNG,AES,AES-CTR,SHA1,SHA256,RSA> real memory = 536870912 (512 MB) avail memory = 485093376 (462 MB) kbd1 at kbdmux0 random: <Software, Yarrow> initialized acpi0: <CN700 AWRDACPI> on motherboard acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, 1ede0000 (3) failed cpu0: <ACPI CPU> on acpi0 root@igel:~ # kldstat Id Refs Address Size Name 1 6 0xc0400000 1275b60 kernel 2 1 0xc7965000 4000 padlock.ko 3 1 0xc7969000 21000 crypto.ko root@igel:~ # and gdb of core $ gdb /usr/local/bin/openssl openssl.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)... Core was generated by `openssl'. Program terminated with signal 4, Illegal instruction. Reading symbols from /usr/local/lib/libssl.so.8...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libssl.so.8 Reading symbols from /usr/local/lib/libcrypto.so.8...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libcrypto.so.8 Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /usr/local/lib/engines/libpadlock.so...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/engines/libpadlock.so Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x28447a4f in padlock_sha1_final () from /usr/local/lib/engines/libpadlock.so [New Thread 28c03080 (LWP 100123/openssl)] (gdb) bt #0 0x28447a4f in padlock_sha1_final () from /usr/local/lib/engines/libpadlock.so #1 0x00000044 in ?? () (gdb) bt full #0 0x28447a4f in padlock_sha1_final () from /usr/local/lib/engines/libpadlock.so No symbol table info available. #1 0x00000044 in ?? () No symbol table info available. (gdb) quit $ rm *.core any ideas ? Beri
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAUsrB4gjJdNfvXuJbBGRz-=8iat2R0auc8ywWDgMwPANSd3pQ>