Received: from eggs.gnu.org ([2001:4830:134:3::10]:60869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btajb-0005iW-NZ for qemu-devel@nongnu.org; Mon, 10 Oct 2016 09:35:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btajZ-0004zX-Gh for qemu-devel@nongnu.org; Mon, 10 Oct 2016 09:35:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btajZ-0004yz-6t for qemu-devel@nongnu.org; Mon, 10 Oct 2016 09:35:13 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9A56E8E675 for ; Mon, 10 Oct 2016 13:35:12 +0000 (UTC) References: <1476099707-526-1-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <7e63c85f-ef42-cdb2-0464-ef496b209fbc@redhat.com> Date: Mon, 10 Oct 2016 08:35:11 -0500 MIME-Version: 1.0 In-Reply-To: <1476099707-526-1-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HHPxxeBuaAnt8aFWSrV2g7Atr9SGSMJoW" Subject: Re: [Qemu-devel] [PATCH] crypto: fix initialization of gcrypt threading List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: "Dr . David Alan Gilbert" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HHPxxeBuaAnt8aFWSrV2g7Atr9SGSMJoW From: Eric Blake To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: "Dr . David Alan Gilbert" Message-ID: <7e63c85f-ef42-cdb2-0464-ef496b209fbc@redhat.com> Subject: Re: [Qemu-devel] [PATCH] crypto: fix initialization of gcrypt threading References: <1476099707-526-1-git-send-email-berrange@redhat.com> In-Reply-To: <1476099707-526-1-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/10/2016 06:41 AM, Daniel P. Berrange wrote: > The gcrypt threads implementation must be set before calling > gcry_check_version, since that triggers initialization of > the random pool. After that is initialized, changes to the > threads impl won't be honoured by the random pool code. This > means that gcrypt will thing thread locking is needed and s/thing/think/ > so try to acquire the random pool mutex, but this is NULL > as no threads impl was set originally. This results in a > crash in the random pool code. >=20 > For the same reasons, gnutls_init must be done after QEMU > initializes gcrypt, since gnutls will itself calling the > gcry_check_version function. >=20 > Signed-off-by: Daniel P. Berrange > --- >=20 > In combination with my previous test case fix, this should > make unit tests pass again on RHEL6 platforms with gcrypt > instead of nettle >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --HHPxxeBuaAnt8aFWSrV2g7Atr9SGSMJoW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX+5kPAAoJEKeha0olJ0NqJiEH/R3248A3UCj+8YiC+wRKEuJ7 M3xcP7o4znPBV1ks22V+A7N8PG2dqZ495t8SiyfRPI7vg+v+6Njfpgf82B2qvp9P foytzszGaXSrlRnnvnatdrOxYFZqjuzXMBpyutSxxN2LjT74q1UrN6XLAQVpSm8m LuHM3PrN4l1P+Rs6glieEAQnXMxGw+ghRTcjIp3aJbVTnlgOpXVYD/Gx1Pcwv0tm TnwlkDzNXQni46JJCYMugstxsHXAyq6AxZGXhXPoKLIoaFCYe4x2fmhXUogD5gcE n8z74vcNpB8OsNHWLoXHtkd7Rr24AY0U81GaiufW2zjK2RgT6YqJIe3/x60s/mY= =umxQ -----END PGP SIGNATURE----- --HHPxxeBuaAnt8aFWSrV2g7Atr9SGSMJoW--