Re: [PATCH] virt-aa-helper: Allow swtpm to fsync on dir

2021-07-13 Thread Neal Gompa
On Tue, Jul 13, 2021 at 2:42 PM Stefan Berger wrote: > > Allow swtpm (0.7.0 or later) to fsync on the directory where it writes > its state files into so that "the entry in the directory containing the > file has also reached disk" (fsync(2)). > > Signed-off-by: Stefan Berger > --- >

[PATCH] virt-aa-helper: Allow swtpm to fsync on dir

2021-07-13 Thread Stefan Berger
Allow swtpm (0.7.0 or later) to fsync on the directory where it writes its state files into so that "the entry in the directory containing the file has also reached disk" (fsync(2)). Signed-off-by: Stefan Berger --- src/security/virt-aa-helper.c | 5 - 1 file changed, 4 insertions(+), 1

[libvirt PATCH v2 09/10] qemuMonitorGetMemoryDeviceInfo: Use automatic memory management

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 9b1a3ec3eb..0b5da8b71f 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4214,7 +4214,7 @@

[libvirt PATCH v2 01/10] virNWFilterCreateVarsFrom: `virHashNew` cannot return NULL

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- tests/nwfilterxml2firewalltest.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index 6709cc15fd..3b7190b5cd 100644 --- a/tests/nwfilterxml2firewalltest.c +++

[libvirt PATCH v2 07/10] iptablesPrivateChainCreate: Remove superfluous `goto`s

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/util/viriptables.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/util/viriptables.c b/src/util/viriptables.c index 847af9b9d7..721e1eeae7 100644 --- a/src/util/viriptables.c +++

[libvirt PATCH v2 10/10] qemuMonitorGetMemoryDeviceInfo: `virHashNew` cannot return NULL

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/qemu/qemu_monitor.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 0b5da8b71f..f66a3457c1 100644 --- a/src/qemu/qemu_monitor.c +++

[libvirt PATCH v2 08/10] qemuMonitorGetMemoryDeviceInfo: Assign hash table only on success

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index a2df1a6ec3..9b1a3ec3eb 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4214,6

[libvirt PATCH v2 03/10] virNWFilterCreateVarsFrom: Remove superfluous `goto`s

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- tests/nwfilterxml2firewalltest.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index 26d4a936ad..bdfe858185 100644 ---

[libvirt PATCH v2 06/10] iptablesPrivateChainCreate: Use automatic memory management

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/util/viriptables.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util/viriptables.c b/src/util/viriptables.c index 198ece3d71..847af9b9d7 100644 --- a/src/util/viriptables.c +++

[libvirt PATCH v2 02/10] virNWFilterCreateVarsFrom: Use automatic memory management

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- tests/nwfilterxml2firewalltest.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index 3b7190b5cd..26d4a936ad 100644 ---

[libvirt PATCH v2 05/10] iptablesPrivateChainCreate: `virHashNew` cannot return NULL

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/util/viriptables.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/util/viriptables.c b/src/util/viriptables.c index 4189578245..198ece3d71 100644 --- a/src/util/viriptables.c +++

[libvirt PATCH v2 04/10] virNWFilterRuleDefToRuleInst: `virHashNew` cannot return NULL

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- tests/nwfilterxml2firewalltest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c index bdfe858185..75a70e9972 100644 ---

[libvirt PATCH v2 00/10] virHashNew refactorings - part II

2021-07-13 Thread Tim Wiederhake
"virHashNew" cannot return NULL, yet we check for NULL in various places. V1: https://listman.redhat.com/archives/libvir-list/2021-July/msg00188.html Changes since V1: * Moved the inversion of the `if` condition in patch #9 to patch #8 * Only patches #8 and #9 are missing review Tim Wiederhake

[libvirt PATCH v2 1/1] virThreadPoolNewFull: Prevent expanding worker pool by zero

2021-07-13 Thread Tim Wiederhake
On libvirtd startup, the list of priority worker threads is uninitialized (`pool->prioWorkers` is NULL), and then "expanded" to zero (`prioWorkers`) entries. This causes `virThreadPoolExpand` to call `VIR_EXPAND_N` on a null pointer and an increment of zero. The zero increment triggers

[libvirt PATCH v2 0/1] Prevent expanding worker pool by zero

2021-07-13 Thread Tim Wiederhake
V1: https://listman.redhat.com/archives/libvir-list/2021-July/msg00217.html Changes since V1: * Fix this not in virThreadPoolExpand, but in virThreadPoolNewFull. * Expanded the commit message. Tim Wiederhake (1): virThreadPoolNewFull: Prevent expanding worker pool by zero

[libvirt PATCH 07/10] virNWFilterBindingDefForNet: Remove superfluous `goto`s

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_nwfilter.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/domain_nwfilter.c b/src/conf/domain_nwfilter.c index cb35221a59..0a67b6765e 100644 --- a/src/conf/domain_nwfilter.c +++ b/src/conf/domain_nwfilter.c @@

[libvirt PATCH 05/10] virNWFilterBindingDefForNet: `virHashNew` cannot return NULL

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_nwfilter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/domain_nwfilter.c b/src/conf/domain_nwfilter.c index 1c62353fa1..5024d5fa03 100644 --- a/src/conf/domain_nwfilter.c +++ b/src/conf/domain_nwfilter.c @@

[libvirt PATCH 10/10] virNWFilterDHCPSnoopInit: `virHashNew` cannot return NULL

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/nwfilter/nwfilter_dhcpsnoop.c | 17 - 1 file changed, 17 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c index 2481ea5371..4b62a7b661 100644 --- a/src/nwfilter/nwfilter_dhcpsnoop.c +++

[libvirt PATCH 08/10] virNWFilterBindingObjListNew: `virHashNew` cannot return NULL

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/virnwfilterbindingobjlist.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/virnwfilterbindingobjlist.c b/src/conf/virnwfilterbindingobjlist.c index 1f19e27eb0..470a30ca90 100644 ---

[libvirt PATCH 09/10] virNWFilterBuildAll: `virHashNew` cannot return NULL

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/nwfilter/nwfilter_gentech_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c index 8aa1db23d3..da4f71daf1 100644 ---

[libvirt PATCH 02/10] virNWFilterBindingDefCopy: `virHashNew` cannot return NULL

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/virnwfilterbindingdef.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/virnwfilterbindingdef.c b/src/conf/virnwfilterbindingdef.c index 98df1f750a..9704e1bebb 100644 --- a/src/conf/virnwfilterbindingdef.c +++

[libvirt PATCH 04/10] virNWFilterBindingDefCopy: Remove superfluous `goto`s

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/virnwfilterbindingdef.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/virnwfilterbindingdef.c b/src/conf/virnwfilterbindingdef.c index 4ed3763efd..22ecf7b828 100644 --- a/src/conf/virnwfilterbindingdef.c +++

[libvirt PATCH 01/10] conf: Add AUTOPTR_CLEANUP_FUNC for virNWFilterBindingDef

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/virnwfilterbindingdef.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/virnwfilterbindingdef.h b/src/conf/virnwfilterbindingdef.h index 0e52789332..68d531b75d 100644 --- a/src/conf/virnwfilterbindingdef.h +++

[libvirt PATCH 03/10] virNWFilterBindingDefCopy: Use automatic memory management

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/virnwfilterbindingdef.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/conf/virnwfilterbindingdef.c b/src/conf/virnwfilterbindingdef.c index 9704e1bebb..4ed3763efd 100644 --- a/src/conf/virnwfilterbindingdef.c +++

[libvirt PATCH 06/10] virNWFilterBindingDefForNet: Use automatic memory management

2021-07-13 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_nwfilter.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_nwfilter.c b/src/conf/domain_nwfilter.c index 5024d5fa03..cb35221a59 100644 --- a/src/conf/domain_nwfilter.c +++ b/src/conf/domain_nwfilter.c @@

[libvirt PATCH 00/10] virHashNew refactorings - part IV

2021-07-13 Thread Tim Wiederhake
"virHashNew" cannot return NULL, yet we check for NULL in various places. See https://listman.redhat.com/archives/libvir-list/2021-July/msg00074.html. Tim Wiederhake (10): conf: Add AUTOPTR_CLEANUP_FUNC for virNWFilterBindingDef virNWFilterBindingDefCopy: `virHashNew` cannot return NULL

[PATCH v1] apparmor: Allow /usr/libexec for private xen-tools binaries

2021-07-13 Thread Olaf Hering
This is a followup for commit e906c4d02bdcddf141b4d124afd68c8ee10134fe ("apparmor: Allow /usr/libexec for libxl-save-helper and pygrub"): In recent rpm versions --libexecdir changed from /usr/lib64 to /usr/libexec. A plain rpmbuild %configure in xen.git will install all files, including the

Re: [libvirt PATCH v2 00/11] virHashNew refactorings

2021-07-13 Thread Michal Prívozník
On 7/13/21 9:36 AM, Michal Prívozník wrote: > On 7/6/21 2:37 PM, Tim Wiederhake wrote: >> "virHashNew" cannot return NULL, yet we check for NULL in various places. >> >> This series is the first of several that remove these checks. Where >> applicable, the functions are refactored to use automatic

[PATCH] test_driver: Implement virDomainGetControlInfo and add test

2021-07-13 Thread Luke Yue
As test driver won't have real background job running, in order to get all possible states, the time is used here to decide which state to be returned. The default time will get `ok` as return value. Note that using `virsh domtime fc4 200` won't take effect for the test driver, to get other

Re: [PATCH] Use postfix increment

2021-07-13 Thread Michal Prívozník
On 7/13/21 11:11 AM, Peter Krempa wrote: > On Tue, Jul 13, 2021 at 08:44:06 +0200, Michal Privoznik wrote: >> We document that our coding style is to use postfix increment in >> for() loops rather than prefix. This change was generated by the >> following sed script: >> >> for i in $(git grep -l

Re: [PATCH] virnettlshelpers: Update private key

2021-07-13 Thread Michal Prívozník
On 7/13/21 11:25 AM, Peter Krempa wrote: > On Tue, Jul 13, 2021 at 08:57:30 +0200, Michal Privoznik wrote: >> In not so distant past (v6.5.0~3) I've updated the private key we >> use for virnettls* tests. Back then I was driven by Fedora 33 >> change which deprecated RSA-1024 which we used back

Tuning tool

2021-07-13 Thread Cedric Bosdonnat
Hi all, I have recently started a virt-tuner tool using the python3 binding. The goal of this tool is to help users tune their domains using a few templates. https://github.com/SUSE/virt-tuner As of today I only wrote a template for a giant VM taking almost all the host resources and mapping

Re: [libvirt PATCH 00/10] virHashNew refactorings - part III

2021-07-13 Thread Peter Krempa
On Mon, Jul 12, 2021 at 11:34:07 +0200, Tim Wiederhake wrote: > "virHashNew" cannot return NULL, yet we check for NULL in various places. > > See https://listman.redhat.com/archives/libvir-list/2021-July/msg00074.html. > Series: Reviewed-by: Peter Krempa

Re: [libvirt PATCH 01/10] testCompareXMLToArgvFiles: `virHashNew` cannot return NULL

2021-07-13 Thread Peter Krempa
The function name in the subject is unfortunately ambiguous. Please prepend it with the test file name or something. On Mon, Jul 12, 2021 at 11:34:08 +0200, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > tests/nwfilterxml2firewalltest.c | 3 --- > 1 file changed, 3 deletions(-)

Re: [libvirt PATCH 00/10] virHashNew refactorings - part II

2021-07-13 Thread Peter Krempa
On Fri, Jul 09, 2021 at 10:27:29 +0200, Tim Wiederhake wrote: > "virHashNew" cannot return NULL, yet we check for NULL in various places. > > See https://listman.redhat.com/archives/libvir-list/2021-July/msg00074.html. > > Tim Wiederhake (10): > virNWFilterCreateVarsFrom: `virHashNew` cannot

Re: [libvirt PATCH 09/10] qemuMonitorGetMemoryDeviceInfo: Use automatic memory management

2021-07-13 Thread Peter Krempa
On Fri, Jul 09, 2021 at 10:27:38 +0200, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/qemu/qemu_monitor.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c > index 8646efe9c4..3a56ed8ef9 100644 >

Re: [libvirt PATCH v2 10/11] qemuMonitorGetChardevInfo: Use automatic memory management

2021-07-13 Thread Tim Wiederhake
On Tue, 2021-07-13 at 09:36 +0200, Michal Prívozník wrote: > On 7/6/21 2:37 PM, Tim Wiederhake wrote: > > Signed-off-by: Tim Wiederhake > > --- > >  src/qemu/qemu_monitor.c | 16 ++-- > >  1 file changed, 6 insertions(+), 10 deletions(-) > > > > diff --git a/src/qemu/qemu_monitor.c

Re: [PATCH] virnettlshelpers: Update private key

2021-07-13 Thread Peter Krempa
On Tue, Jul 13, 2021 at 08:57:30 +0200, Michal Privoznik wrote: > In not so distant past (v6.5.0~3) I've updated the private key we > use for virnettls* tests. Back then I was driven by Fedora 33 > change which deprecated RSA-1024 which we used back then. I > generated an EC-384 key which was fine

Re: [PATCH] Use postfix increment

2021-07-13 Thread Peter Krempa
On Tue, Jul 13, 2021 at 08:44:06 +0200, Michal Privoznik wrote: > We document that our coding style is to use postfix increment in > for() loops rather than prefix. This change was generated by the > following sed script: > > for i in $(git grep -l "for (.*; ++.*)"); do \ > sed -i 's/\(for

Re: [PATCH] virsh: Fix the order of format arguments in doDump

2021-07-13 Thread Peter Krempa
On Tue, Jul 13, 2021 at 16:04:12 +0800, Han Han wrote: > According to definition of virDomainCoreDumpFormat, the "elf" should be > the first argument in VIR_ENUM_*. > > Fixes: 84cc4543be > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1981625 > > Signed-off-by: Han Han > --- >

[PATCH] virsh: Fix the order of format arguments in doDump

2021-07-13 Thread Han Han
According to definition of virDomainCoreDumpFormat, the "elf" should be the first argument in VIR_ENUM_*. Fixes: 84cc4543be Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1981625 Signed-off-by: Han Han --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [libvirt PATCH v2 10/11] qemuMonitorGetChardevInfo: Use automatic memory management

2021-07-13 Thread Michal Prívozník
On 7/6/21 2:37 PM, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/qemu/qemu_monitor.c | 16 ++-- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c > index cb59fc7b7b..4489b809f4 100644 > ---

Re: [libvirt PATCH v2 00/11] virHashNew refactorings

2021-07-13 Thread Michal Prívozník
On 7/6/21 2:37 PM, Tim Wiederhake wrote: > "virHashNew" cannot return NULL, yet we check for NULL in various places. > > This series is the first of several that remove these checks. Where > applicable, the functions are refactored to use automatic memory management > by means of g_autoptr etc.

[PATCH] virnettlshelpers: Update private key

2021-07-13 Thread Michal Privoznik
In not so distant past (v6.5.0~3) I've updated the private key we use for virnettls* tests. Back then I was driven by Fedora 33 change which deprecated RSA-1024 which we used back then. I generated an EC-384 key which was fine as it was considered strong enough until RHEL-9 came along. RHEL-9 no

[PATCH] Use postfix increment

2021-07-13 Thread Michal Privoznik
We document that our coding style is to use postfix increment in for() loops rather than prefix. This change was generated by the following sed script: for i in $(git grep -l "for (.*; ++.*)"); do \ sed -i 's/\(for (.*; \)++\(.*\))/\1\2++)/' $i; \ done Signed-off-by: Michal Privoznik