Bug 204527 - security/openssl: 1.0.2 generates illegal instructions when compiled WITH_ASM on sparc64
Summary: security/openssl: 1.0.2 generates illegal instructions when compiled WITH_ASM...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: sparc64 Any
: --- Affects Some People
Assignee: Dirk Meyer
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2015-11-13 18:36 UTC by Kurt Lidl
Modified: 2016-03-02 04:28 UTC (History)
2 users (show)

See Also:
koobs: merge-quarterly?


Attachments
typescript of 'make clean test' session (328.56 KB, text/plain)
2015-11-17 05:14 UTC, Kurt Lidl
no flags Details
script of 'make test' run on HEAD (r291993) (330.30 KB, text/plain)
2015-12-16 23:40 UTC, Kurt Lidl
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kurt Lidl freebsd_committer 2015-11-13 18:36:39 UTC
I recently installed a new 10/stable onto a sparc64 host (r290630).

I configured the ports to use the openssl from ports, via having:

WITH_OPENSSL_PORT=yes

In my /etc/make.conf file.

After I got openssl installed, I installed the bind 9.10 package too:
ton# pkg info bind910
bind910-9.10.3_1
Name           : bind910
Version        : 9.10.3_1
Installed on   : Thu Nov 12 22:41:05 EST 2015
Origin         : dns/bind910
Architecture   : freebsd:10:sparc64:64
Prefix         : /usr/local
Categories     : net dns ipv6
Licenses       : ISCL
Maintainer     : mat@FreeBSD.org
WWW            : https://www.isc.org/software/bind
Comment        : BIND DNS suite with updated DNSSEC and DNS64
[...]

With the openssl port configured and compiled WITH_ASM, when I attempted
to start named, it complained:

ton# /usr/local/etc/rc.d/named start
__sparc_utrap: fatal illegal instruction
__sparc_utrap: fatal illegal instruction
__sparc_utrap: fatal illegal instruction
wrote key file "/usr/local/etc/namedb/rndc.key"
__sparc_utrap: fatal illegal instruction
__sparc_utrap: fatal illegal instruction
__sparc_utrap: fatal illegal instruction
Starting named.
__sparc_utrap: fatal illegal instruction
__sparc_utrap: fatal illegal instruction
__sparc_utrap: fatal illegal instruction
ton# ldd =named
/usr/local/sbin/named:
	libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x4057e000)
	libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x4086a000)
	libz.so.6 => /lib/libz.so.6 (0x40af8000)
	libm.so.5 => /lib/libm.so.5 (0x40c0e000)
	libthr.so.3 => /lib/libthr.so.3 (0x40d74000)
	libc.so.7 => /lib/libc.so.7 (0x40e9e000)
	liblzma.so.5 => /usr/lib/liblzma.so.5 (0x4115c000)

I re-installed the openssl port, this time without the WITH_ASM
setting.

ton# /usr/local/etc/rc.d/named start
Starting named.
ton# ldd =named
/usr/local/sbin/named:
	libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x4057e000)
	libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x40858000)
	libz.so.6 => /lib/libz.so.6 (0x40ae6000)
	libm.so.5 => /lib/libm.so.5 (0x40bfc000)
	libthr.so.3 => /lib/libthr.so.3 (0x40d62000)
	libc.so.7 => /lib/libc.so.7 (0x40e8c000)
	liblzma.so.5 => /usr/lib/liblzma.so.5 (0x4114a000)
Comment 1 Mark Linimon freebsd_committer 2015-11-13 22:36:15 UTC
Hmm.  I'm showing dinoex@ as the maintainer.
Comment 2 Dirk Meyer freebsd_committer 2015-11-16 18:44:31 UTC
please run

cd /usr/ports/security/openssl && make clean test

and report when the test fails.
Comment 3 Kurt Lidl freebsd_committer 2015-11-17 05:14:43 UTC
Created attachment 163230 [details]
typescript of 'make clean test' session

Captured output from 'make clean test' after configuring with ASM again.
Comment 4 Dirk Meyer freebsd_committer 2015-12-12 22:55:13 UTC
Please test again with the new OpenSSL version.
Comment 5 Kurt Lidl freebsd_committer 2015-12-16 23:40:32 UTC
Created attachment 164303 [details]
script of 'make test' run on HEAD (r291993)

The machine has been upgraded to a fairly recent HEAD (r291993)
version.  When the ASM option is set, it still fails.

Log file of most recent attempt is attached.
Comment 6 commit-hook freebsd_committer 2016-02-13 09:49:08 UTC
A commit references this bug:

Author: dinoex
Date: Sat Feb 13 09:48:27 UTC 2016
New revision: 408778
URL: https://svnweb.freebsd.org/changeset/ports/408778

Log:
  - mark options ASM broken on sparc64
  PR:		204527

Changes:
  head/security/openssl/Makefile
Comment 7 Dirk Meyer freebsd_committer 2016-02-13 10:01:21 UTC
unable to fix the build, marked broken:
Comment 8 commit-hook freebsd_committer 2016-03-02 04:28:17 UTC
A commit references this bug:

Author: delphij
Date: Wed Mar  2 04:27:16 UTC 2016
New revision: 409910
URL: https://svnweb.freebsd.org/changeset/ports/409910

Log:
  MFH: r407415, r408778, r409885 (dinoex):

  - add new manpages
  Submitted by:	olli hauer

  - mark options ASM broken on sparc64
  PR:		204527

  - Security update to 1.0.2g

  Security: https://www.openssl.org/news/secadv/20160301.txt
  Security: CVE-2016-0800
  Security: CVE-2016-0705
  Security: CVE-2016-0798
  Security: CVE-2016-0797
  Security: CVE-2016-0799
  Security: CVE-2016-0702
  Security: CVE-2016-0703
  Security: CVE-2016-0704
  Approved by:	ports-secteam

Changes:
_U  branches/2016Q1/
  branches/2016Q1/security/openssl/Makefile
  branches/2016Q1/security/openssl/distinfo
  branches/2016Q1/security/openssl/pkg-plist