From nobody Wed Nov 24 18:24:40 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 649741893D10; Wed, 24 Nov 2021 18:24:46 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from mail.anongoth.pl (mail.anongoth.pl [46.248.190.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X448 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "anongoth.pl", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HzqDG0w85z3hlg; Wed, 24 Nov 2021 18:24:46 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from anongoth.pl (unknown [192.168.1.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: pkubaj@anongoth.pl) by mail.anongoth.pl (Postfix) with ESMTPSA id 9AD0F10AFEE; Wed, 24 Nov 2021 19:24:42 +0100 (CET) Date: Wed, 24 Nov 2021 19:24:40 +0100 From: Piotr Kubaj To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3a60869237b8 - main - Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le Message-ID: References: <202111232227.1ANMRCYk070382@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qRjQw2/MAoU9sVAt" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4HzqDG0w85z3hlg X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N --qRjQw2/MAoU9sVAt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable OK, it looks like ossl uses fpu_kern functions and those are available only= an aarch64, amd64 and i386: cc -O2 -pipe -fno-common -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MOD= ULE -nostdinc -include /usr/obj/usr/src/powerpc.powerpc64/sys/modules/oss= l/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-co= mmon -fPIC -mlongcall -fno-omit-frame-pointer -fdebug-prefix-map=3D./machi= ne=3D/usr/src/sys/powerpc/include -MD -MF.depend.ossl.o -MTossl.o -mno= -altivec -msoft-float -mabi=3Delfv2 -ffreestanding -fwrapv -fstack-protecto= r -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-pr= ototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__= =3D__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wn= o-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wn= o-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-= sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -Wno-for= mat-zero-length -std=3Diso9899:1999 -c /usr/src/sys/crypto/openssl/ossl= =2Ec -o ossl.o /usr/src/sys/crypto/openssl/ossl.c:190:4: error: implicit declaration of fu= nction 'fpu_kern_enter' is invalid in C99 [-Werror,-Wimplicit-function-decl= aration] fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); ^ /usr/src/sys/crypto/openssl/ossl.c:190:36: error: use of undeclared identif= ier 'FPU_KERN_NOCTX' fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); ^ /usr/src/sys/crypto/openssl/ossl.c:193:4: error: implicit declaration of fu= nction 'fpu_kern_leave' is invalid in C99 [-Werror,-Wimplicit-function-decl= aration] fpu_kern_leave(curthread, NULL); ^ /usr/src/sys/crypto/openssl/ossl.c:193:4: note: did you mean 'fpu_kern_ente= r'? /usr/src/sys/crypto/openssl/ossl.c:190:4: note: 'fpu_kern_enter' declared h= ere fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); ^ /usr/src/sys/crypto/openssl/ossl.c:214:6: error: implicit declaration of fu= nction 'is_fpu_kern_thread' is invalid in C99 [-Werror,-Wimplicit-function-= declaration] if (is_fpu_kern_thread(0)) { ^ /usr/src/sys/crypto/openssl/ossl.c:217:3: error: implicit declaration of fu= nction 'fpu_kern_enter' is invalid in C99 [-Werror,-Wimplicit-function-decl= aration] fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); ^ /usr/src/sys/crypto/openssl/ossl.c:217:35: error: use of undeclared identif= ier 'FPU_KERN_NOCTX' fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); ^ /usr/src/sys/crypto/openssl/ossl.c:263:3: error: implicit declaration of fu= nction 'fpu_kern_leave' is invalid in C99 [-Werror,-Wimplicit-function-decl= aration] fpu_kern_leave(curthread, NULL); ^ 7 errors generated. AFAIK porting those is not easy and it's certainly above my pay grade. On 21-11-24 08:15:26, John Baldwin wrote: > On 11/23/21 2:27 PM, Piotr Kubaj wrote: > > The branch main has been updated by pkubaj (ports committer): > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3a60869237b8b315fe66497c= f5299ec08b688533 > >=20 > > commit 3a60869237b8b315fe66497cf5299ec08b688533 > > Author: Piotr Kubaj > > AuthorDate: 2021-11-22 02:28:46 +0000 > > Commit: Piotr Kubaj > > CommitDate: 2021-11-23 22:26:53 +0000 > >=20 > > Add assembly optimized code for OpenSSL on powerpc, powerpc64 and = powerpc64le > > =20 > > Summary: > > 1. https://github.com/openssl/openssl/commit/34ab13b7d8e3e723adb60= be8142e38b7c9cd382a > > needs to be merged for ELFv2 support on big-endian. > > 2. crypto/openssl/crypto/ppccap.c needs to be patched. > > Same reason as in https://github.com/openssl/openssl/pull/17082. >=20 > Have you looked at adding powerpc support to ossl(4)? It should be fairl= y simple > (just adding the right asm files in Makefiles and the powerpc equivalent = of > OSSL_cpuid). >=20 > --=20 > John Baldwin --qRjQw2/MAoU9sVAt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAmGeg2gACgkQelmbhSCD nJ1eVBAApv3riGUqY+aVDZT4uNSX61jyAcn7uSq43PZdqFoqXO1uQ/iNfAwx4kas 9w7OshIWJT4EwH9RDFh1KUqseOdLQzbCj35/qZclWxIQO+qbCVti8yHkhdj4BgY9 pSaxL3NOHq20+JlzqosUd1cTL/vnX/hhu6na2cf4w3vriPGAe5bNKQbj642LonET QLUBcMNjQE7E6tI8x+wm3gsAexx/hhz92JlpDIrwoWKf0PxagMDu00HqHqlssOZ0 DuASEg6eSkf4ctuVwusnuLgmlKG7O9mrMLzN3mCLHNKi5jAbSPrETOux9bcAOAjH kRQN4ZespyB9xxF5s3LQTHXF58Ha9ziWkiqZTVa0GkdVYFNC4+jMYZhk6fTNSBol Exuj97J9xT5btvMUMBptbnpMhN664Jyo+3Yh9zdvuSbM3hlYPu/oDHINcE3CEzpB acDj72bNluyAI+I3kBf0vtQRbAxpAbk3mwiIk8PxIYZYtlVYB9p+dTbvAyYKOzhJ C0Y6fcBNDmBmAirvMNNbWBulYAf5cYs6l8v0aLgLuQfr8aRawr0AUy+JpDsqwdkr aKt+S13wqS94xQB1E8wAEQKBoKPyYlXFN4K4OfSONjrm8c33CMzeCU1grY+Bq91E 0UMUa195pDCcpAWBabrSaEJcyLxSOnn7XXbSHN5vCjbYlYBe9PA= =uQmv -----END PGP SIGNATURE----- --qRjQw2/MAoU9sVAt--