From nobody Wed May 14 21:55:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 151687312508552.722442186627745; Thu, 25 Jan 2018 01:38:45 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 19EA6780F0; Thu, 25 Jan 2018 09:38:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C1680600D1; Thu, 25 Jan 2018 09:38:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 12B5C18033DB; Thu, 25 Jan 2018 09:38:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0P9ce7L003156 for ; Thu, 25 Jan 2018 04:38:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id AFA996031B; Thu, 25 Jan 2018 09:38:40 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 77D7750F1F; Thu, 25 Jan 2018 09:38:39 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 25 Jan 2018 09:38:14 +0000 Message-Id: <20180125093825.5834-4-berrange@redhat.com> In-Reply-To: <20180125093825.5834-1-berrange@redhat.com> References: <20180125093825.5834-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/14] rpc: don't link in second copy of RPC code to libvirtd & lockd plugin X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 25 Jan 2018 09:38:44 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 The libvirt_driver_remote.la static library is linked into the libvirt.so dynamic library, providing both the generic RPC layer code and the remote protocol client driver. The libvirtd daemon the itself links to libvirt_driver_remote.la, in order to get access to the generic RPC layer code and the XDR functions for the remote driver. This means we get multiple copies of the same code in libvirtd, one direct and one indirect via libvirt.so. The same mistake affects the lockd plugin. The libvirtd daemon should instead just link aganist the generic RPC layer code that's in libvirt.so. This is easily doable if we add exports for the few symbols we've previously missed, and wildcard export xdr_* to expose the auto-generated XDR marshallers. Signed-off-by: Daniel P. Berrang=C3=A9 --- daemon/Makefile.am | 1 - src/Makefile.am | 12 +++++------- src/libvirt_remote.syms | 11 ++++++++++- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index b0c28d2313..f7519efe2f 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -205,7 +205,6 @@ libvirtd_LDADD +=3D \ libvirtd_admin.la \ ../src/libvirt-lxc.la \ ../src/libvirt-qemu.la \ - ../src/libvirt_driver_remote.la \ $(NULL) =20 libvirtd_LDADD +=3D ../src/libvirt.la diff --git a/src/Makefile.am b/src/Makefile.am index 6b4db22937..ec2b4f631c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1310,16 +1310,11 @@ if WITH_REMOTE noinst_LTLIBRARIES +=3D libvirt_driver_remote.la libvirt_la_BUILT_LIBADD +=3D libvirt_driver_remote.la libvirt_driver_remote_la_CFLAGS =3D \ - $(GNUTLS_CFLAGS) \ $(XDR_CFLAGS) \ -I$(srcdir)/conf \ -I$(srcdir)/rpc \ $(AM_CFLAGS) libvirt_driver_remote_la_LDFLAGS =3D $(AM_LDFLAGS) -libvirt_driver_remote_la_LIBADD =3D $(GNUTLS_LIBS) \ - libvirt-net-rpc-client.la \ - libvirt-net-rpc-server.la \ - libvirt-net-rpc.la libvirt_driver_remote_la_SOURCES =3D $(REMOTE_DRIVER_SOURCES) =20 BUILT_SOURCES +=3D $(REMOTE_DRIVER_GENERATED) @@ -2574,8 +2569,6 @@ lockd_la_CFLAGS =3D -I$(srcdir)/conf \ $(AM_CFLAGS) lockd_la_LDFLAGS =3D -module -avoid-version $(AM_LDFLAGS) lockd_la_LIBADD =3D ../gnulib/lib/libgnu.la \ - libvirt-net-rpc.la \ - libvirt-net-rpc-client.la \ $(NULL) augeas_DATA +=3D locking/libvirt_lockd.aug if WITH_DTRACE_PROBES @@ -2889,6 +2882,11 @@ noinst_LTLIBRARIES +=3D \ libvirt-net-rpc-server.la \ libvirt-net-rpc-client.la =20 +libvirt_la_BUILT_LIBADD +=3D \ + libvirt-net-rpc.la \ + libvirt-net-rpc-server.la \ + libvirt-net-rpc-client.la + EXTRA_DIST +=3D \ dtrace2systemtap.pl \ rpc/gendispatch.pl \ diff --git a/src/libvirt_remote.syms b/src/libvirt_remote.syms index a181c4cf7f..da14a2449c 100644 --- a/src/libvirt_remote.syms +++ b/src/libvirt_remote.syms @@ -5,6 +5,9 @@ # Keep this file sorted by header name, then by symbols with each header. # =20 +# Generated files +xdr_*; + # rpc/virnetclient.h virNetClientAddProgram; virNetClientAddStream; @@ -80,6 +83,7 @@ virNetDaemonUpdateServices; =20 =20 # rpc/virnetmessage.h +virNetMessageAddFD; virNetMessageClear; virNetMessageClearPayload; virNetMessageDecodeHeader; @@ -96,7 +100,6 @@ virNetMessageNew; virNetMessageQueuePush; virNetMessageQueueServe; virNetMessageSaveError; -xdr_virNetMessageError; =20 =20 # rpc/virnetserver.h @@ -104,12 +107,14 @@ virNetServerAddClient; virNetServerAddProgram; virNetServerAddService; virNetServerClose; +virNetServerGetClient; virNetServerGetClients; virNetServerGetCurrentClients; virNetServerGetCurrentUnauthClients; virNetServerGetMaxClients; virNetServerGetMaxUnauthClients; virNetServerGetName; +virNetServerGetThreadPoolParameters; virNetServerHasClients; virNetServerNew; virNetServerNewPostExecRestart; @@ -117,6 +122,8 @@ virNetServerNextClientID; virNetServerPreExecRestart; virNetServerProcessClients; virNetServerSetClientAuthenticated; +virNetServerSetClientLimits; +virNetServerSetThreadPoolParameters; virNetServerStart; virNetServerUpdateServices; =20 @@ -128,11 +135,13 @@ virNetServerClientCloseLocked; virNetServerClientDelayedClose; virNetServerClientGetAuth; virNetServerClientGetFD; +virNetServerClientGetID; virNetServerClientGetIdentity; virNetServerClientGetInfo; virNetServerClientGetPrivateData; virNetServerClientGetReadonly; virNetServerClientGetSELinuxContext; +virNetServerClientGetTimestamp; virNetServerClientGetTransport; virNetServerClientGetUNIXIdentity; virNetServerClientImmediateClose; --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list