[libvirt] [PATCH 0/6] readline: Drop obsolete code, add pkg-config support
by Andrea Bolognani
This series drops a bunch of compatibility code that's no longer
necessary to support our target platforms and introduces support
for getting readline's CFLAGS and LIBS via pkg-config, which in
turn makes it possible to automatically enable the feature on
FreeBSD.
There are a couple of caveats:
* while most of the existing kludges are dropped, a new one had
to be introduced :( The upsides are that the new kludge is small
and straightforward, and that there's an expiration date on it
already, since a patch making it unnecessary has already been
provided for upstream readline;
* autodetection on macOS still doesn't work because of a
downstream packaging issue, but that's not any worse than the
current situation anyway.
Andrea Bolognani (6):
tools: vsh: Drop obsolete readline compatibility code
m4: readline: Extract code setting -D_FUNCTION_DEF
m4: readline: Stop looking for rl_completion_quote_character()
m4: readline: Drop extra_LIBS machinery
m4: readline: Use pkg-config
m4: readline: Add gross kludge for include path
m4/virt-readline.m4 | 68 ++++++++++++++++++++++-----------------------
tools/vsh.c | 17 ------------
2 files changed, 33 insertions(+), 52 deletions(-)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH v2 0/6] lxc: Add suport to virConnectGetAllDomainStats
by Julio Faracco
This series has a collection of new methods to enable support for
virConnectGetAllDomainStats() to LXC driver. The only difference is Disk
Stats. It needs to consider only the host file system operations as a
valid block device. So, other disks should start with index 1..N.
Other difference is an implementation of Kernel Memory CGroup to grab
this info from each LXC container.
- v1-v2: Added suggestions made by Peter Krempa.
Julio Faracco (6):
lxc: Introduce method lxcConnectGetAllDomainStats
lxc: Introduce method lxcDomainGetStats
lxc: Introduce method lxcDomainGetStatsCpu
lxc: Introduce method lxcDomainGetStatsBlock
cgroup: Get kernel memory entry from CGroup V1
lxc: Introduce method lxcDomainGetBalloonStats
src/libvirt_private.syms | 2 +
src/lxc/lxc_driver.c | 391 ++++++++++++++++++++++++++++++++++++
src/util/vircgroup.c | 32 +++
src/util/vircgroup.h | 2 +
src/util/vircgroupbackend.h | 10 +
src/util/vircgroupv1.c | 36 ++++
6 files changed, 473 insertions(+)
--
2.19.1
5 years, 7 months
[libvirt] [PATCH] cpu_map: rename x86_EPYC-IBRS file to x86_EPYC-IBPB
by Pavel Hrdina
The later is the correct CPU model name.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed under trivial rule.
And yes, there is a typo s/later/latter/.
src/cpu_map/Makefile.inc.am | 2 +-
src/cpu_map/index.xml | 2 +-
src/cpu_map/{x86_EPYC-IBRS.xml => x86_EPYC-IBPB.xml} | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename src/cpu_map/{x86_EPYC-IBRS.xml => x86_EPYC-IBPB.xml} (100%)
diff --git a/src/cpu_map/Makefile.inc.am b/src/cpu_map/Makefile.inc.am
index 9eeb33e4be..9d7cef15c5 100644
--- a/src/cpu_map/Makefile.inc.am
+++ b/src/cpu_map/Makefile.inc.am
@@ -22,7 +22,7 @@ cpumap_DATA = \
cpu_map/x86_cpu64-rhel5.xml \
cpu_map/x86_cpu64-rhel6.xml \
cpu_map/x86_EPYC.xml \
- cpu_map/x86_EPYC-IBRS.xml \
+ cpu_map/x86_EPYC-IBPB.xml \
cpu_map/x86_Haswell.xml \
cpu_map/x86_Haswell-IBRS.xml \
cpu_map/x86_Haswell-noTSX.xml \
diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml
index dccda3919d..130a17a353 100644
--- a/src/cpu_map/index.xml
+++ b/src/cpu_map/index.xml
@@ -58,7 +58,7 @@
<include filename="x86_Opteron_G4.xml"/>
<include filename="x86_Opteron_G5.xml"/>
<include filename="x86_EPYC.xml"/>
- <include filename="x86_EPYC-IBRS.xml"/>
+ <include filename="x86_EPYC-IBPB.xml"/>
</arch>
<arch name='ppc64'>
diff --git a/src/cpu_map/x86_EPYC-IBRS.xml b/src/cpu_map/x86_EPYC-IBPB.xml
similarity index 100%
rename from src/cpu_map/x86_EPYC-IBRS.xml
rename to src/cpu_map/x86_EPYC-IBPB.xml
--
2.20.1
5 years, 7 months
[libvirt] [PATCH 0/3] Replace vmware/esx argv string to VMX_CONFIG_FORMAT_ARGV
by Han Han
Han Han (3):
vmx: Define macro VMX_CONFIG_FORMAT_ARGV for vmware-vmx
esx: Use VMX_CONFIG_FORMAT_ARGV for esx naive argv
vmware: Use VMX_CONFIG_FORMAT_ARGV for vmware naive argv
src/esx/esx_driver.c | 4 ++--
src/vmware/vmware_conf.c | 2 +-
src/vmware/vmware_driver.c | 2 +-
src/vmx/vmx.h | 2 ++
4 files changed, 6 insertions(+), 4 deletions(-)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH] util: Fix uninitalized variable to avoid garbage
by Julio Faracco
This commit fixes an unitialized variable to avoid garbage value
when virNetDevBridgeGet method returns error. When, that method fails
before initialize 'val' variable, it can cause problems related to
that.
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/util/virnetdevbridge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c
index 8d2d8bfc86..0f301d9216 100644
--- a/src/util/virnetdevbridge.c
+++ b/src/util/virnetdevbridge.c
@@ -760,7 +760,7 @@ int virNetDevBridgeGetSTP(const char *brname,
bool *enabled)
{
int ret = -1;
- unsigned long val;
+ unsigned long val = 0;
ret = virNetDevBridgeGet(brname, "stp_state", &val);
*enabled = val ? true : false;
--
2.19.1
5 years, 7 months
[libvirt] [PATCH] snapshot: Fix use-after-free during snapshot delete
by Eric Blake
Commit b647d2195 introduced a use-after-free situation when the caller
is trying to delete a snapshot and its children: if the callback
function deletes the parent, it is no longer safe to query the parent
to learn which children also need to be deleted (where we previously
saved deleting the parent for last). To fix the problem, while still
maintaining support for topological visits of callback functions, we
have to stash off any information needed for later traversal prior to
using a callback function (virDomainMomentForEachChild already does
this, it is only virDomainMomentActOnDescendant that was running into
problems).
Sadly, the testsuite did not cover the problem at the time. Worse,
even though I later added commit 280a2b41e to catch problems like
this, and even though that test is indeed sufficient to detect the
problem when run under valgrind or suitable MALLOC_PERTURB_ settings,
I'm guilty of not running the test in such an environment. Thus,
v5.2.0 has a regression that could have been prevented had we used the
testsuite to its full power. On the bright side, deleting snapshots
requires ACL domain:snapshot, which is arguably as powerful as
domain:write, so I don't think this use-after-free forms a security
hole.
At some point, it would be nice to convert virDomainMomentObj into a
virObject, at which point, the solution is even simpler: add
virObjectRef/Unref around the callback. But as that will require
auditing even more places in the code, I went with the simplest patch
for the regression fix.
Fixes: b647d2195
Reported-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
src/conf/virdomainmomentobjlist.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/conf/virdomainmomentobjlist.c b/src/conf/virdomainmomentobjlist.c
index 65e82f632c..66eb66017b 100644
--- a/src/conf/virdomainmomentobjlist.c
+++ b/src/conf/virdomainmomentobjlist.c
@@ -80,9 +80,11 @@ virDomainMomentActOnDescendant(void *payload,
{
virDomainMomentObjPtr obj = payload;
struct moment_act_on_descendant *curr = data;
+ virDomainMomentObj tmp = *obj;
+ /* Careful: curr->iter can delete obj, hence the need for tmp */
(curr->iter)(payload, name, curr->data);
- curr->number += 1 + virDomainMomentForEachDescendant(obj,
+ curr->number += 1 + virDomainMomentForEachDescendant(&tmp,
curr->iter,
curr->data);
return 0;
--
2.20.1
5 years, 7 months
[libvirt] [PATCH 0/5] snapshot coverage in 'make check'
by Eric Blake
Given that my recent snapshot changes introduced two separate bugs,
both of which were fairly easy to reproduce with the test:///default
driver, but neither of which caused 'make check' to alert me to the
problems, it's high time I submit a test, including enhancing virsh to
give me the functionality the test needs.
Eric Blake (5):
snapshot: Avoid infloop during REDEFINE
virsh: Parse # comments in batch mode
virsh: Treat any command name starting with # as comment
virsh: Add 'echo --err' option
snapshot: Add tests of virsh -c test:///default snapshot*
src/conf/snapshot_conf.c | 1 +
tests/Makefile.am | 3 +-
tests/virsh-snapshot | 212 +++++++++++++++++++++++++++++++++++++++
tests/virshtest.c | 7 ++
tools/virsh.pod | 10 +-
tools/virt-admin.pod | 7 +-
tools/vsh.c | 34 ++++++-
7 files changed, 263 insertions(+), 11 deletions(-)
create mode 100755 tests/virsh-snapshot
--
2.20.1
5 years, 7 months
[libvirt] [ocaml PATCH 0/3] Few misc improvements
by Pino Toscano
Raise the libvirt version to the de-facto requirement, and add a new
API which will be useful. Also, sync Virterror with libvirt.
Pino Toscano (3):
build: bump required libvirt to 1.2.8
Implement Connect.get_domain_capabilities
Synchronize Virterror with libvirt 5.2.0
configure.ac | 2 +-
libvirt/libvirt.ml | 12 ++++++++++++
libvirt/libvirt.mli | 23 ++++++++++++++++++++++-
libvirt/libvirt_c_epilogue.c | 4 ++--
libvirt/libvirt_c_oneoffs.c | 16 ++++++++++++++++
5 files changed, 53 insertions(+), 4 deletions(-)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH 0/5] util: Clean up header inclusion
by Peter Krempa
Peter Krempa (5):
util: Move VIR_AUTOUNREF definition to virobject.h
util: Move the VIR_AUTO(CLEAN|PTR) helper macros into a separate
header
util: Don't include 'viralloc.h' into other header files
util: Move enum convertors into virenum.(c|h)
Include unistd.h directly by files using it
src/Makefile.am | 5 ++
src/access/viraccessperm.h | 1 +
src/conf/capabilities.c | 1 +
src/conf/cpu_conf.h | 1 +
src/conf/device_conf.h | 1 +
src/conf/domain_capabilities.h | 2 +-
src/conf/domain_conf.h | 1 +
src/conf/interface_conf.h | 1 +
src/conf/network_conf.h | 1 +
src/conf/node_device_conf.h | 1 +
src/conf/node_device_util.c | 1 +
src/conf/numa_conf.h | 1 +
src/conf/nwfilter_conf.h | 1 +
src/conf/storage_adapter_conf.h | 1 +
src/conf/storage_conf.h | 1 +
src/conf/virdomainmomentobjlist.c | 1 +
src/conf/virdomainsnapshotobjlist.c | 1 +
src/conf/virnwfilterbindingobj.c | 2 +
src/libvirt_private.syms | 19 +++--
src/libxl/libxl_domain.c | 1 +
src/locking/lock_daemon_config.c | 2 +
src/locking/lock_driver_lockd.c | 2 +
src/logging/log_daemon_config.c | 2 +
src/lxc/lxc_conf.c | 2 +
src/lxc/lxc_fuse.c | 2 +
src/lxc/lxc_fuse.h | 1 -
src/network/leaseshelper.c | 1 +
src/nwfilter/nwfilter_ebiptables_driver.c | 1 +
src/qemu/qemu_firmware.c | 1 +
src/qemu/qemu_firmware.h | 1 -
src/remote/remote_daemon_config.c | 2 +
src/security/security_dac.c | 1 +
src/security/security_manager.c | 1 +
src/storage/storage_file_fs.c | 1 +
src/util/Makefile.inc.am | 3 +
src/util/viralloc.h | 77 -------------------
src/util/virauth.c | 1 +
src/util/virauthconfig.c | 1 +
src/util/virauthconfig.h | 2 +-
src/util/virautoclean.h | 90 +++++++++++++++++++++++
src/util/virbitmap.c | 1 +
src/util/virbitmap.h | 2 +-
src/util/virbuffer.c | 1 +
src/util/virbuffer.h | 2 +-
src/util/vircgroup.h | 1 +
src/util/vircgroupv1.c | 2 +
src/util/vircgroupv2.c | 2 +
src/util/vircommand.c | 1 +
src/util/vircommand.h | 1 -
src/util/virconf.h | 1 +
src/util/virenum.c | 84 +++++++++++++++++++++
src/util/virenum.h | 80 ++++++++++++++++++++
src/util/virerror.c | 1 +
src/util/virerror.h | 2 +-
src/util/virfile.c | 1 +
src/util/virfile.h | 1 -
src/util/virfirewall.c | 1 +
src/util/virfirewall.h | 2 +-
src/util/virfirewalld.c | 2 +
src/util/virgic.h | 1 +
src/util/virhash.c | 1 +
src/util/virhash.h | 2 +-
src/util/virjson.c | 2 +
src/util/virjson.h | 1 -
src/util/virkeycode.h | 1 +
src/util/virmacaddr.c | 1 +
src/util/virmacaddr.h | 2 +-
src/util/virmdev.c | 1 +
src/util/virmdev.h | 2 +-
src/util/virnetdev.c | 2 +
src/util/virnetdev.h | 2 +-
src/util/virnetdevip.c | 2 +
src/util/virnetdevmacvlan.c | 2 +
src/util/virnetdevmacvlan.h | 1 +
src/util/virnetdevvlan.c | 1 +
src/util/virnetdevvlan.h | 3 +-
src/util/virnetdevvportprofile.c | 2 +
src/util/virnetdevvportprofile.h | 1 +
src/util/virnetlink.c | 1 +
src/util/virnetlink.h | 1 -
src/util/virobject.h | 10 +++
src/util/virpci.c | 1 +
src/util/virpci.h | 2 +-
src/util/virperf.c | 2 +
src/util/virperf.h | 3 +-
src/util/virpidfile.c | 1 +
src/util/virpolkit.c | 1 +
src/util/virprocess.h | 1 +
src/util/virresctrl.c | 1 +
src/util/virresctrl.h | 2 +-
src/util/virscsi.c | 1 +
src/util/virscsi.h | 1 -
src/util/virscsivhost.c | 1 +
src/util/virscsivhost.h | 1 -
src/util/virsecret.h | 1 +
src/util/virsocketaddr.c | 1 +
src/util/virsocketaddr.h | 2 +-
src/util/virstorageencryption.h | 1 +
src/util/virstoragefile.h | 1 +
src/util/virstring.h | 1 -
src/util/virsysinfo.h | 1 +
src/util/virtypedparam.h | 1 +
src/util/virusb.c | 1 +
src/util/virusb.h | 1 -
src/util/virutil.c | 58 ---------------
src/util/virutil.h | 55 --------------
tests/eventtest.c | 1 +
tests/objecteventtest.c | 2 +
tests/qemusecuritymock.c | 1 +
tests/scsihosttest.c | 1 +
tests/vboxsnapshotxmltest.c | 1 +
tests/vircgroupmock.c | 1 +
tests/virfiletest.c | 1 +
tests/virfilewrapper.c | 1 +
tests/virlockspacetest.c | 1 +
tests/virnetdaemontest.c | 2 +
tests/virnetsockettest.c | 1 +
tests/virnettlscontexttest.c | 1 +
tests/virnettlshelpers.c | 1 +
tests/virnettlssessiontest.c | 1 +
tests/virscsitest.c | 1 +
tests/virstoragetest.c | 1 +
tools/virt-host-validate-common.h | 1 +
123 files changed, 406 insertions(+), 223 deletions(-)
create mode 100644 src/util/virautoclean.h
create mode 100644 src/util/virenum.c
create mode 100644 src/util/virenum.h
--
2.20.1
5 years, 7 months