From owner-freebsd-arm@freebsd.org Sat Mar 4 23:33:02 2017 Return-Path: Delivered-To: freebsd-arm@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 3187FCF8F2D for ; Sat, 4 Mar 2017 23:33:02 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-193.reflexion.net [208.70.211.193]) (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 D4B9414DA for ; Sat, 4 Mar 2017 23:33:01 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 16468 invoked from network); 4 Mar 2017 23:32:53 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 4 Mar 2017 23:32:53 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.30.2) with SMTP; Sat, 04 Mar 2017 18:32:53 -0500 (EST) Received: (qmail 6940 invoked from network); 4 Mar 2017 23:32:53 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 4 Mar 2017 23:32:53 -0000 Received: from [192.168.1.111] (c-67-170-167-181.hsd1.or.comcast.net [67.170.167.181]) by iron2.pdx.net (Postfix) with ESMTPSA id F2A86EC8BF3; Sat, 4 Mar 2017 15:32:52 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: Is CPUTYPE=cortex-A7 supposed to work? From: Mark Millard In-Reply-To: <87tw7820fc.fsf@news-spur.riddles.org.uk> Date: Sat, 4 Mar 2017 15:32:52 -0800 Cc: Warner Losh , "freebsd-arm@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <644D1F49-BF5D-409D-BFC4-4F7E6E73085B@dsl-only.net> References: <871suc3nv8.fsf@news-spur.riddles.org.uk> <87tw7820fc.fsf@news-spur.riddles.org.uk> To: Andrew Gierth X-Mailer: Apple Mail (2.3259) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Mar 2017 23:33:02 -0000 On 2017-Mar-4, at 1:47 PM, Andrew Gierth wrote: >=20 >>>>>> "Warner" =3D=3D Warner Losh writes: >=20 >>> Is building with CPUTYPE=3Dcortex-A7 (this is on an RPI2) known to >>> work, known to not work, or of unknown working status? >=20 > Warner> I've not had good luck getting it to work. (cortex-a7 is the > Warner> proper type name, btw). It kinda works, but ports are kinda > Warner> wonky. >=20 > My findings so far: >=20 > 1. openssl speed (base system's openssl, not a port) produces a bunch = of > errors, such as: >=20 > 542635024:error:0407006A:rsa = routines:RSA_padding_check_PKCS1_type_1:block type is not = 01:/home/FreeBSD/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/r= sa/rsa_pk1.c:103: > 542635024:error:04067072:rsa routines:RSA_EAY_PUBLIC_DECRYPT:padding = check = failed:/home/FreeBSD/src/secure/lib/libcrypto/../../../crypto/openssl/cryp= to/rsa/rsa_eay.c:705: >=20 > 2. git fails with semi-random sha1 failures when cloning a repo of any > size; these failures go away if you make it use its internal sha1 = rather > than the openssl one it defaults to. HOWEVER, testing in a world build > without CPUTYPE and shoehorning the vectorized sha1 from openssl back = in > does not reproduce the failure. Also, extensive testing with "openssl > dgst -sha1" did not produce any failure. >=20 > (I've confirmed that both the above go away from recompiling without > CPUTYPE.) >=20 > I've also noticed some breakage probably not related to openssl for > which I'm still waiting on recompilations in order to definitively = test. >=20 > --=20 > Andrew. Trying (1) on a bpim3 with head instead (still clang 3.9.1 based), I get such notices for: Doing 512 bit public rsa's for 10s: RSA verify failure Doing 2048 bit public rsa's for 10s: RSA verify failure Doing 4096 bit public rsa's for 10s: RSA verify failure I also get: Doing 512 bit sign dsa's for 10s: 10527 512 bit DSA signs in 10.09s DSA verify failure. No DSA verify will be done. Doing 1024 bit sign dsa's for 10s: 4035 1024 bit DSA signs in 10.02s Doing 1024 bit verify dsa's for 10s: DSA verify failure 1 1024 bit DSA verify in 10.00s Doing 2048 bit sign dsa's for 10s: 1239 2048 bit DSA signs in 10.07s DSA verify failure. No DSA verify will be done. Doing 409 bit verify ecdsa's for 10s: ECDSA verify failure 1 409 bit ECDSA verify in 10.02s # uname -paKU FreeBSD bpim3 12.0-CURRENT FreeBSD 12.0-CURRENT r314479M arm armv6 = 1200022 1200022 The openssl issue likely is worth submitting as a bugzilla report, with speed as an example way to see the issue. (Note: I use CFLAGS and the like because sometimes I experiment with other options as well. No such extra options involved for the above.) =3D=3D=3D Mark Millard markmi at dsl-only.net