x86's /proc/cpuinfo (was Re: libcrypto: Illegal instruction ``pshufb'' on non-sse3 CPU)

2016-01-12 Thread Masanobu SAITOH

On 2015/05/19 22:02, Masanobu SAITOH wrote:

Hi.

On 2015/05/19 10:45, Timo Buhrmester wrote:

As of late, when building (and installing) -head I end up with a libcrypto 
causing SIGILL, apparently due to using the ``pshufb'' instruction (which I 
believe is part of the SSE3 extension).

My CPU is, according to /proc/cpuinfo:


  For x86, /proc/cpuinfo have not maintained for many years...
To avoid this problem, use "cpuctl identify 0" instead of /proc/cpuinfo
to check cpu features (PR#49246).

  Regards.


 I've commit the change of x86/procfs_machdep.c to print much information about 
CPU features now!

Example:

 before:


processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 12
model name  : Intel(R) Xeon(R) CPU E3-1240L v3 @ 2.00GHz
stepping: 3
cpu MHz : 2000.24
fdiv_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 13
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm


 after:


processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 12
model name  : Intel(R) Xeon(R) CPU E3-1240L v3 @ 2.00GHz
stepping: 3
cpu MHz : 2000.27
fdiv_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 13
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb 
rdtscp lm pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma 
cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes 
xsave avx f16c rdrand lahf_lm abm fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 
erms invpcid rtm



 It's not perfect but it's better than before


 Thanks.










processor: 0
vendor_id: AuthenticAMD
cpu family: 15
model: 6
model name: AMD Athlon(tm) II X2 265 Processor
stepping: 3
cpu MHz: 3311.46
fdiv_bug: no
fpu: yes
fpu_exception: yes
cpuid level: 5
wp: yes
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 ht

processor: 1
[another core]


(No sse3)


As far as gdb is concerned, in libcrypto.so.8.4, this is the point where it 
blows up:
[...]
   >0x7f7ff6f3ba87  pshufb %xmm6,%xmm0   ;bang
0x7f7ff6f3ba8c  add$0x40,%r9 ;for context
0x7f7ff6f3ba90  pshufb %xmm6,%xmm1
0x7f7ff6f3ba95  pshufb %xmm6,%xmm2
0x7f7ff6f3ba9a  pshufb %xmm6,%xmm3
0x7f7ff6f3ba9f  paddd  %xmm9,%xmm0

(Core dump available on request)

The assembly code originates from 
crypto/external/bsd/openssl/dist/crypto/sha/asm/sha1-x86_64.pl (around line 
346), but seems to have been untouched for too long to be the culprit (a -head 
build in March didn't provoke the problem yet).

Any ideas?







--
---
SAITOH Masanobu (msai...@execsw.org
 msai...@netbsd.org)


Automated report: NetBSD-current/i386 build failure

2016-01-12 Thread NetBSD Test Fixture
This is an automatically generated notice of a NetBSD-current/i386
build failure.

The failure occurred on babylon5.netbsd.org, a NetBSD/amd64 host,
using sources from CVS date 2016.01.12.23.03.55.

An extract from the build.sh output follows:

--- includes-dev ---
--- includes-crypto/external ---
--- 
/tmp/bracket/build/2016.01.12.23.03.55-i386/destdir/usr/include/openssl/ui_compat.h
 ---
--- includes-sys ---
--- includes-ieee1394 ---
--- includes-include ---
--- /tmp/bracket/build/2016.01.12.23.03.55-i386/destdir/usr/include/sgtty.h 
---
--- includes-sys ---
includes ===> sys/dev/ieee1394
--- includes-tests ---
--- includes-inet ---
--- includes-sys ---
--- includes-arch ---
--- includes-tests ---
--- includes-net ---
--- includes-carp ---
--- includes-external ---
--- includes-gpl2 ---
nbmake[7]: nbmake[7]: don't know how to make includes. Stop
nbmake[7]: stopped in 
/tmp/bracket/build/2016.01.12.23.03.55-i386/src/external/gpl2/gettext/locale
*** [includes-locale] Error code 2
nbmake[6]: stopped in 
/tmp/bracket/build/2016.01.12.23.03.55-i386/src/external/gpl2/gettext
1 error

The following commits were made between the last successful build and
the failed build:

2016.01.12.22.58.00 christos src/external/gpl2/gettext/Makefile,v 1.1
2016.01.12.22.58.00 christos src/external/gpl2/gettext/Makefile.inc,v 1.1
2016.01.12.22.58.00 christos src/external/gpl2/gettext/gettext2netbsd,v 1.1
2016.01.12.22.58.01 christos src/external/gpl2/gettext/bin/Makefile,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/Makefile.inc.prog,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/gettext/Makefile,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/gettextize/Makefile,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/gettextize/gettextize,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/msgattrib/Makefile,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/msgcat/Makefile,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/msgcmp/Makefile,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/msgcomm/Makefile,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/msgconv/Makefile,v 1.1
2016.01.12.22.58.01 christos src/external/gpl2/gettext/bin/msgen/Makefile,v 
1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/msgexec/Makefile,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/msgfilter/Makefile,v 1.1
2016.01.12.22.58.01 christos 
src/external/gpl2/gettext/bin/msgfmt/Makefile,v 1.1
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/bin/msggrep/Makefile,v 1.1
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/bin/msginit/Makefile,v 1.1
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/bin/msgmerge/Makefile,v 1.1
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/bin/msgunfmt/Makefile,v 1.1
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/bin/msguniq/Makefile,v 1.1
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/bin/xgettext/Makefile,v 1.1
2016.01.12.22.58.02 christos src/external/gpl2/gettext/dist/Makefile.in,v 
1.2
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/dist/autoconf-lib-link/Makefile.in,v 1.2
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/dist/gettext-runtime/Makefile.am,v 1.2
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/dist/gettext-runtime/Makefile.in,v 1.2
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/dist/gettext-runtime/libasprintf/Makefile.in,v 1.2
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/dist/gettext-tools/Makefile.am,v 1.2
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/dist/gettext-tools/Makefile.in,v 1.2
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/dist/gettext-tools/doc/Makefile.in,v 1.2
2016.01.12.22.58.02 christos 
src/external/gpl2/gettext/dist/gettext-tools/doc/texi2html,v 1.2
2016.01.12.22.58.03 christos 
src/external/gpl2/gettext/dist/gettext-tools/gnulib-lib/javaversion.c,v 1.2
2016.01.12.22.58.03 christos 
src/external/gpl2/gettext/dist/gettext-tools/libuniname/uniname.c,v 1.2
2016.01.12.22.58.03 christos 
src/external/gpl2/gettext/dist/gettext-tools/misc/Makefile.in,v 1.2
2016.01.12.22.58.03 christos 
src/external/gpl2/gettext/dist/gettext-tools/src/message.h,v 1.2
2016.01.12.22.58.03 christos 
src/external/gpl2/gettext/dist/gettext-tools/src/msgl-fsearch.c,v 1.2
2016.01.12.22.58.03 christos 
src/external/gpl2/gettext/dist/gettext-tools/src/po-lex.c,v 1.2
2016.01.12.22.58.03 christos src/external/gpl2/gettext/include/alloca.h,v 
1.1
2016.01.12.22.58.03 christos src/external/gpl2/gettext/include/byteswap.h,v 
1.1
2016.01.12.22.58.03 christos