From owner-freebsd-ports-bugs@freebsd.org Sat Apr 22 17:26:15 2017 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F552D4B45C for ; Sat, 22 Apr 2017 17:26:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35086145 for ; Sat, 22 Apr 2017 17:26:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v3MHQECS045396 for ; Sat, 22 Apr 2017 17:26:15 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 218815] security/openssl-devel doesn't run correctly during encryption/decryption use Date: Sat, 22 Apr 2017 17:26:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dewayne@heuristicsystems.com.au X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: brnrd@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Apr 2017 17:26:15 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D218815 Bug ID: 218815 Summary: security/openssl-devel doesn't run correctly during encryption/decryption use Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: brnrd@freebsd.org Reporter: dewayne@heuristicsystems.com.au Assignee: brnrd@freebsd.org Flags: maintainer-feedback?(brnrd@freebsd.org) Doesn't run correctly - vague title I'm sorry. Basically this is the problem. dd if=3D/dev/zero bs=3D8m count=3D64 | openssl enc -e -aes-256-cbc -pass pa= ss:fred | openssl enc -d -aes-256-cbc -pass pass:fred | dd of=3D/dev/null takes longer than the expected sub-2 seconds. After 2 minutes I ^c. Background I'm having a few problems with libressl on amd64 (latest FreeBSD 11.0Stable= ).=20 Due to deadline I need to update vulnerable ports, hence the need to consid= er openssl-devel (primarily for the chacha cipher). Testing So step 1. Check performance of=20 openssl speed md5 aes-256-cbc (i386 jail on amd64 base, expected to be slow= er) OpenSSL 1.0.2k 26 Jan 2017 type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 byt= es md5 33310.31k 101690.17k 225189.68k 325980.15k 374042.= 04k aes-256 cbc 100778.51k 108379.29k 110181.76k 110869.89k 110494.= 38k dd if=3D/dev/zero bs=3D8m count=3D64 | openssl enc -e -aes-256-cbc -pass pa= ss:fred | openssl enc -d -aes-256-cbc -pass pass:fred | dd of=3D/dev/null 536870912 bytes transferred in 1.978219 secs (271391044 bytes/sec) 536870912 bytes transferred in 1.978499 secs (271352608 bytes/sec) Compare against existing libressl (amd64) openssl version; openssl speed md5 aes-256-cbc LibreSSL 2.4.5 The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 byt= es md5 42508.63k 140502.95k 320085.21k 473776.60k 550627.= 68k aes-256 cbc 81890.66k 87571.86k 89172.71k 89595.03k 89826.= 19k hathor# dd if=3D/dev/zero bs=3D8m count=3D64 | openssl enc -e -aes-256-cbc = -pass pass:fred | openssl enc -d -aes-256-cbc -pass pass:fred | dd of=3D/dev/null 536870912 bytes transferred in 1.691704 secs (317355170 bytes/sec) 536870912 bytes transferred in 1.691909 secs (317316725 bytes/sec) Step 2 Build openssl-devel and compare, first on the amd64 then i386. I've left more information in this. OpenSSL 1.1.0e 16 Feb 2017 built on: reproducible build, date unspecified options:bn(64,64) rc4(16x,int) des(int) aes(partial) blowfish(ptr) compiler: /usr/local/libexec/ccache/cc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_S= SE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_A= SM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES= _ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR=3D"\"/usr/local/openssl\"" -DENGINESDIR=3D"\"/usr/local/lib/engines-1.1\"" The 'numbers' are in 1000s of bytes per second processed. type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 byt= es=20 16384 bytes md5 79251.15k 223127.65k 407711.12k 513011.04k 553732.= 56k=20 555582.29k aes-256 cbc 79520.54k 85543.12k 86719.75k 87328.00k 87522.= 05k=20 87346.92k dd if=3D/dev/zero bs=3D8m count=3D64 | openssl enc -e -aes-256-cbc -pass pa= ss:fred | openssl enc -d -aes-256-cbc -pass pass:fred | dd of=3D/dev/null Hmm ^t load: 2.34 cmd: openssl 22223 [running] 170.60r 26.77u 143.66s 100% 5588k 550825+0 records in 550825+0 records out 282022400 bytes transferred in 170.607199 secs (1653051 bytes/sec) 34+0 records in 33+2 records out 285212672 bytes transferred in 172.487025 secs (1653531 bytes/sec) Well. That's a little outside tolerance... Hence the title. It does build and does run, but...unsuccessfully.=20=20 Ok so I methodically removed the defaults: asm, sse2, threads. Each default option was removed, the package rebuilt and reinstalled (first asm, then asm and sse2...). Same problem. Out of "options" and ideas :( --=20 You are receiving this mail because: You are the assignee for the bug.=