More ksyms-related build errors

2015-05-19 Thread Paul Goyette

With the latest commits, I'm still getting this error on amd64:

#   compile  kdump/kdump-ioctl.o
...
In file included from /build/netbsd-local/src/sys/sys/dkio.h:35:0,
 from /build/netbsd-local/src/sys/sys/disk.h:85,
 from kdump-ioctl.c:16:kdump-ioctl.c: In function 'ioctlname':
/build/netbsd-local/src/sys/sys/ksyms.h:111:35: error: invalid application of 
'sizeof' to incomplete type 'struct ksyms_gsymbol'
 #define KIOCGSYMBOL _IOWR('l', 5, struct ksyms_gsymbol)
   ^
/build/netbsd-local/src/sys/sys/ioccom.h:67:19: note: in definition of macro 
'_IOC'
 ((inout) | (((len) & IOCPARM_MASK) << IOCPARM_SHIFT) | \
   ^
/build/netbsd-local/src/sys/sys/ksyms.h:111:21: note: in expansion of macro 
'_IOWR'
 #define KIOCGSYMBOL _IOWR('l', 5, struct ksyms_gsymbol)
 ^
kdump-ioctl.c:8563:7: note: in expansion of macro 'KIOCGSYMBOL'
  case KIOCGSYMBOL:
   ^
*** [kdump-ioctl.o] Error code 1


-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-


daily CVS update output

2015-05-19 Thread NetBSD source update

Updating src tree:
P src/crypto/dist/ipsec-tools/src/racoon/gssapi.c
P src/distrib/amd64/cdroms/Makefile.cdrom
P src/distrib/common/Makefile.bootcd
P src/distrib/i386/cdroms/Makefile.cdrom
P src/distrib/notes/acorn26/contents
P src/distrib/notes/acorn32/contents
P src/distrib/notes/acorn32/hardware
U src/distrib/notes/alpha/contents
P src/distrib/notes/alpha/hardware
P src/distrib/notes/amd64/contents
P src/distrib/notes/amiga/contents
P src/distrib/notes/arc/contents
P src/distrib/notes/atari/contents
P src/distrib/notes/bebox/contents
P src/distrib/notes/bebox/hardware
P src/distrib/notes/cats/contents
cvs update: `src/distrib/notes/common/list-setsizes.sh' is no longer in the 
repository
P src/distrib/notes/common/macros
P src/distrib/notes/common/main
P src/distrib/notes/common/netboot
P src/distrib/notes/common/postinstall
P src/distrib/notes/common/sysinst
P src/distrib/notes/emips/contents
P src/distrib/notes/emips/hardware
P src/distrib/notes/emips/install
P src/distrib/notes/evbarm/contents
P src/distrib/notes/evbppc/contents
P src/distrib/notes/ews4800mips/contents
P src/distrib/notes/hp300/contents
P src/distrib/notes/hpcarm/contents
P src/distrib/notes/hpcmips/contents
P src/distrib/notes/hpcsh/contents
P src/distrib/notes/hppa/contents
P src/distrib/notes/i386/contents
P src/distrib/notes/landisk/contents
P src/distrib/notes/mac68k/contents
P src/distrib/notes/mac68k/hardware
P src/distrib/notes/mac68k/prep
P src/distrib/notes/macppc/contents
P src/distrib/notes/macppc/hardware
P src/distrib/notes/mmeye/contents
P src/distrib/notes/mvme68k/contents
P src/distrib/notes/news68k/contents
P src/distrib/notes/newsmips/contents
P src/distrib/notes/next68k/contents
P src/distrib/notes/ofppc/contents
P src/distrib/notes/pmax/contents
P src/distrib/notes/pmax/hardware
P src/distrib/notes/prep/contents
P src/distrib/notes/prep/hardware
P src/distrib/notes/prep/upgrade
P src/distrib/notes/rs6000/contents
P src/distrib/notes/sandpoint/contents
P src/distrib/notes/sgimips/contents
P src/distrib/notes/shark/contents
P src/distrib/notes/sparc/contents
P src/distrib/notes/sparc/hardware
P src/distrib/notes/sparc/prep
P src/distrib/notes/sparc64/contents
P src/distrib/notes/sparc64/hardware
P src/distrib/notes/sun2/contents
P src/distrib/notes/sun3/contents
P src/distrib/notes/vax/contents
P src/distrib/notes/vax/hardware
P src/distrib/notes/x68k/contents
P src/distrib/notes/x68k/hardware
P src/distrib/sparc/Makefile
P src/distrib/sparc64/cdroms/installcd/Makefile
P src/distrib/vax/cdroms/installcd/Makefile
P src/lib/libc/db/db/db.c
P src/lib/libc/gen/nlist_elf32.c
P src/sbin/ifconfig/Makefile
P src/sys/arch/arm/arm/cpufunc_asm_pj4b.S
P src/sys/arch/arm/include/armreg.h
P src/sys/arch/arm/marvell/armadaxp.c
P src/sys/arch/arm/marvell/mvsocreg.h
P src/sys/arch/arm/nvidia/tegra_car.c
P src/sys/arch/mips/cavium/octeon_intr.c
P src/sys/arch/mips/conf/std.octeon
P src/sys/compat/netbsd32/netbsd32_ioctl.c
P src/sys/compat/netbsd32/netbsd32_ioctl.h
P src/sys/dev/i2c/sdtemp.c
P src/sys/dev/i2c/sdtemp_reg.h
P src/sys/kern/kern_ksyms.c
P src/sys/netinet/tcp_subr.c
P src/sys/sys/ipc.h
P src/sys/sys/ksyms.h
P src/sys/sys/time.h
P src/sys/ufs/ffs/ffs_vfsops.c
P src/tests/net/mcast/t_mcast.c
P src/tests/net/route/t_flags.sh

Updating xsrc tree:


Killing core files:

Running the SUP scanner:
SUP Scan for current starting at Wed May 20 03:13:27 2015
SUP Scan for current completed at Wed May 20 03:18:36 2015
SUP Scan for mirror starting at Wed May 20 03:18:36 2015
SUP Scan for mirror completed at Wed May 20 03:28:25 2015



Updating release-5 src tree (netbsd-5):

Updating release-5 xsrc tree (netbsd-5):

Running the SUP scanner:
SUP Scan for release-5 starting at Wed May 20 03:39:34 2015
SUP Scan for release-5 completed at Wed May 20 03:39:43 2015



Updating release-6 src tree (netbsd-6):
U doc/CHANGES-6.2
P sys/arch/vax/vax/ka660.c

Updating release-6 xsrc tree (netbsd-6):

Running the SUP scanner:
SUP Scan for release-6 starting at Wed May 20 03:46:18 2015
SUP Scan for release-6 completed at Wed May 20 03:46:31 2015




Updating file list:
-rw-rw-r--  1 srcmastr  netbsd  47520559 May 20 04:03 ls-lRA.gz


Re: Build error - ELF

2015-05-19 Thread Paul Goyette

BTW, this error occurred while building usr.sbin/crash ...


On Wed, 20 May 2015, Paul Goyette wrote:


On amd64 with up-to-date source tree...


/build/netbsd-local/src/usr.sbin/crash/../../sys/ddb/db_elf.c:51:0: error: 
"ELFSIZE" redefined [-Werror]

#define ELFSIZE  DB_ELFSIZE
^
In file included from 
/build/netbsd-local/src/usr.sbin/crash/../../sys/sys/ksyms.h:33:0,
from 
/build/netbsd-local/src/usr.sbin/crash/../../sys/ddb/db_sym.h:31,
from 
/build/netbsd-local/src/usr.sbin/crash/../../sys/ddb/ddb.h:46,
from 
/build/netbsd-local/src/usr.sbin/crash/../../sys/ddb/db_elf.c:40:
/build/netbsd-local/src/usr.sbin/crash/../../sys/sys/exec_elf.h:1030:0: note: 
this is the location of the previous definition

#define ELFSIZE ARCH_ELFSIZE
^


-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-



-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-


Build error - ELF

2015-05-19 Thread Paul Goyette

On amd64 with up-to-date source tree...


/build/netbsd-local/src/usr.sbin/crash/../../sys/ddb/db_elf.c:51:0: error: 
"ELFSIZE" redefined [-Werror]
 #define ELFSIZE  DB_ELFSIZE
 ^
In file included from 
/build/netbsd-local/src/usr.sbin/crash/../../sys/sys/ksyms.h:33:0,
 from 
/build/netbsd-local/src/usr.sbin/crash/../../sys/ddb/db_sym.h:31,
 from 
/build/netbsd-local/src/usr.sbin/crash/../../sys/ddb/ddb.h:46,
 from 
/build/netbsd-local/src/usr.sbin/crash/../../sys/ddb/db_elf.c:40:

/build/netbsd-local/src/usr.sbin/crash/../../sys/sys/exec_elf.h:1030:0: note: 
this is the location of the previous definition
 #define ELFSIZE ARCH_ELFSIZE
 ^


-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-


Re: libcrypto: Illegal instruction ``pshufb'' on non-sse3 CPU

2015-05-19 Thread Joerg Sonnenberger
On Tue, May 19, 2015 at 05:16:21PM +0200, Timo Buhrmester wrote:
> Joerg:
> 
> > > [...] SIGILL [...] due to using the ``pshufb'' instruction
> > I think you are actually ending up in the AVX code path. The question is
> > why. What is the value OPENSSL_ia32cap_P?
> That's 0x78b

and the high part, e.g. OPENSSL_ia32cap_P[1]?

Joerg


Re: libcrypto: Illegal instruction ``pshufb'' on non-sse3 CPU

2015-05-19 Thread Timo Buhrmester
Joerg:

> > [...] SIGILL [...] due to using the ``pshufb'' instruction
> I think you are actually ending up in the AVX code path. The question is
> why. What is the value OPENSSL_ia32cap_P?
That's 0x78b



Masanobu:

>  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).
# cpuctl identify 0
cpu0: highest basic info 0005
cpu0: highest extended info 801b
cpu0: "AMD Athlon(tm) II X2 265 Processor"
cpu0: AMD Family 10h (686-class), 3311.46 MHz
cpu0: family 0x10 model 0x6 stepping 0x3 (id 0x100f63)
cpu0: features 0x178bfbff
cpu0: features 0x178bfbff
cpu0: features1 0x802009
cpu0: features2 0xefd3fbff
cpu0: features2 0xefd3fbff<3DNOW2,3DNOW>
cpu0: features3 0x37ff
cpu0: features3 0x37ff
cpu0: I-cache 64KB 64B/line 2-way, D-cache 64KB 64B/line 2-way
cpu0: L2 cache 1MB 64B/line 16-way
cpu0: ITLB 32 4KB entries fully associative, 16 2MB entries fully associative
cpu0: DTLB 48 4KB entries fully associative, 48 2MB entries fully associative
cpu0: L2 ITLB 512 4KB entries 4-way
cpu0: L2 DTLB 512 4KB entries 4-way, 128 2MB entries 2-way
cpu0: L1 1GB page DTLB 48 1GB entries fully associative
cpu0: L2 1GB page DTLB 16 1GB entries 8-way
cpu0: Initial APIC ID 0
cpu0: AMD Power Management features: 0x1f9
cpu0: SVM Rev. 1
cpu0: SVM NASID 64
cpu0: SVM features 0xf
cpu0: UCode version: 0x1c8


Thanks for caring!
Kind regards


Re: libcrypto: Illegal instruction ``pshufb'' on non-sse3 CPU

2015-05-19 Thread Masanobu SAITOH

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.




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)