From owner-svn-src-projects@freebsd.org Thu Sep 20 17:41:33 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E3A810A3A04 for ; Thu, 20 Sep 2018 17:41:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4F03765CC; Thu, 20 Sep 2018 17:41:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (static-71-168-218-4.cmdnnj.fios.verizon.net [71.168.218.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id B0C5D1EC4E; Thu, 20 Sep 2018 17:41:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk To: Konstantin Belousov , Benjamin Kaduk Cc: svn-src-projects@freebsd.org, src-committers , John Baldwin References: <201809200020.w8K0K45h000526@repo.freebsd.org> <20180920100939.GU3161@kib.kiev.ua> <20180920131952.GZ3161@kib.kiev.ua> From: Jung-uk Kim Openpgp: preference=signencrypt Autocrypt: addr=jkim@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJBztUBCAChqNyGqmFuNo0U7MBzsD+q/G6Cv0l7LGVrOAsgh34M8wIWhD+tztDWMVfn AhxNDd0ceCj2bYOe67sTQxAScEcbt2FfvPOLp9MEXb9qohZj172Gwkk7dnhOhZZKhVGVZKM4 NcsuBDUzgf4f3Vdzj4wg6WlqplnTZo8lP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ZcJQf+IsTCxUEqY7W/pT84sMg5/QD3s6ufTRncvq14fEOxCNq1Rf4Q 9P+tOFa8GZfKDGB2BFGIrW7uT5mlmKdK1vO6ZIA930y5kUsnCmBUEBJkE2ciSQk01aB/1o62 Q3Gk/F6BwtNY9OXiqF7AcAo+K/BMIaqb26QKeh+IIgK1NN9dQiq3ByTbl4zpGZa6MmsnnRTu mzGKt2nkz7vBzH6+hZp1OzGZikgjjhYWVFoJo1dvf/rv4obs0ZJEqFPQs/1Qa1dbkKBv6odB XJpPH0ssOluTY24d1XxTiKTwmWvHeQkOKRAIfD7VTtF4TesoZYkf7hsh3e3VwXhptSLFnEOi WwYofg== Message-ID: <08a628fe-e640-7804-7c54-de9fdc407c7d@FreeBSD.org> Date: Thu, 20 Sep 2018 13:41:26 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: <20180920131952.GZ3161@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5sKM4ShNQUwFJ6mVqOSkRqBwMFeDEOwdz" X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2018 17:41:33 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5sKM4ShNQUwFJ6mVqOSkRqBwMFeDEOwdz Content-Type: multipart/mixed; boundary="SYCygdmBryqEwtMPxZRQ11jqWZ5oAY3CQ"; protected-headers="v1" From: Jung-uk Kim To: Konstantin Belousov , Benjamin Kaduk Cc: svn-src-projects@freebsd.org, src-committers , John Baldwin Message-ID: <08a628fe-e640-7804-7c54-de9fdc407c7d@FreeBSD.org> Subject: Re: svn commit: r338816 - in projects/openssl111: secure/lib/libcrypto share/mk References: <201809200020.w8K0K45h000526@repo.freebsd.org> <20180920100939.GU3161@kib.kiev.ua> <20180920131952.GZ3161@kib.kiev.ua> In-Reply-To: <20180920131952.GZ3161@kib.kiev.ua> --SYCygdmBryqEwtMPxZRQ11jqWZ5oAY3CQ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 18. 9. 20., Konstantin Belousov wrote: > On Thu, Sep 20, 2018 at 08:16:02AM -0500, Benjamin Kaduk wrote: >> On Thu, Sep 20, 2018 at 5:10 AM Konstantin Belousov >> wrote: >> >>> On Thu, Sep 20, 2018 at 12:20:04AM +0000, Jung-uk Kim wrote: >>>> Author: jkim >>>> Date: Thu Sep 20 00:20:04 2018 >>>> New Revision: 338816 >>>> URL: https://svnweb.freebsd.org/changeset/base/338816 >>>> >>>> Log: >>>> Link libcrypto with pthread. >>> Why ? >>> >>> >> It uses pthread_once and pthread locks. > So what ? libc provides the stubs. Historically, OpenSSL was okay without pthread because native implementation wasn't provided and users had to provide native callback functions instead. https://www.openssl.org/docs/man1.0.2/crypto/threads.html In fact, "objdump -T /lib/libcrypto.so.8 | grep pthread_" returns nothing. dwmalone discovered it and committed r127643 about 14 years ago= =2E https://svnweb.freebsd.org/changeset/base/127643 Now OpenSSL 1.1 actually uses POSIX pthread. Please see the blog post for the rationale: https://www.openssl.org/blog/blog/2017/02/21/threads/ Unfortunately, our stubs are not enough or broken somehow, i.e., some functions malfunction without pthread. FYI, OpenSSL 1.1.1 requires the following functions now: pthread_atfork(3) pthread_equal(3) pthread_getspecific(3) pthread_key_create(3) pthread_key_delete(3) pthread_once(3) pthread_rwlock_destroy(3) pthread_rwlock_init(3) pthread_rwlock_rdlock(3) pthread_rwlock_unlock(3) pthread_rwlock_wrlock(3) pthread_self(3) pthread_setspecific(3) If you have a functional patch for libc stubs, I'll be more than happy to revert it. Jung-uk Kim --SYCygdmBryqEwtMPxZRQ11jqWZ5oAY3CQ-- --5sKM4ShNQUwFJ6mVqOSkRqBwMFeDEOwdz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAluj28wACgkQfJ+WJvzb 8UY2LAf+NKOnKk/IzKJIrxQyLnuidfwOmb8qKobANtit60gCu7uFKFblIY4XUIhX qVNANmEpWaB4kv86suzOjShYLuPdWdAEUCktSt+89HzeBaE2GehU81OBwx5tV4n8 FvCHUNCSbsRC3BLC0UGSu+CdNkflzF5cPjchvdbMNCsZ7kMi9ounzrlmehyAq5bZ uU971wkuAnPHnVuH05gxL7yy5dXOYy3F6ei9tmQ5cUJnfv8NvK3PEzbasrEmmXGn v3pAIcqivrTFynNMgaUd57bnjfhUNe0+xhQ9DMVGdl3v3Jyb612fZSE7SPSmKYdT niZwc8Wy+cRos+6XI+BkdfxZrZKoDQ== =3xF+ -----END PGP SIGNATURE----- --5sKM4ShNQUwFJ6mVqOSkRqBwMFeDEOwdz--