Re: [PATCH v2 1/1] nwfilter: Avoid possible double free in virNWFilterInstReset()

2025-04-15 Thread Michal Prívozník via Devel
On 4/14/25 15:51, Alexander Kuznetsov wrote: > virNWFilterInstReset() may be called multiple times, leading to a double > g_free() > Replace plain g_free() with g_clear_pointer() to prevent this > > Found by Linux Verification Center (linuxtesting.org) with Svace. > > Reported-by: Dmitry Fedin

Re: Management applications and CPU feature flags

2025-04-15 Thread Jiří Denemark via Devel
On Fri, Apr 11, 2025 at 15:58:54 +0200, Cornelia Huck wrote: > On Fri, Apr 11 2025, Jiri Denemark wrote: > > > On Fri, Apr 11, 2025 at 13:43:39 +0200, Markus Armbruster wrote: > >> Daniel P. Berrangé writes: > >> > On Fri, Apr 11, 2025 at 12:40:46PM +0200, Markus Armbruster wrote: > >> >> Daniel

[PATCH v2 1/1] nss: Fix memory leak in findLease

2025-04-15 Thread Alexander Kuznetsov
path is allocated by asprintf() and must be freed later if realloc() fails Restructure the code to allocate path only after realloc() succeeds, avoiding the need for an extra free() Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Dmitry Fedin Signed-off-by: Alexan

Re: [PATCH v2 1/1] nss: Fix memory leak in findLease

2025-04-15 Thread Michal Prívozník via Devel
On 4/15/25 13:48, Alexander Kuznetsov wrote: > path is allocated by asprintf() and must be freed later if realloc() fails > > Restructure the code to allocate path only after realloc() succeeds, > avoiding the need for an extra free() > > Found by Linux Verification Center (linuxtesting.org) with

[PATCH v2 0/1] nss: Fix memory leak in findLease

2025-04-15 Thread Alexander Kuznetsov
v2: - don't touch free() call inside LIBVIRT_NSS_GUEST macro - rearrange asprintf to be called after realloc, so no extra free call is needed Alexander Kuznetsov (1): nss: Fix memory leak in findLease tools/nss/libvirt_nss.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.4

[PATCH] virsh: prevent potential NULL dereference

2025-04-15 Thread Alexander Kuznetsov
virXPathString() can return NULL so we need to check it before calling strcmp() Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Dmitry Fedin Signed-off-by: Alexander Kuznetsov --- tools/virsh-completer-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH v4 2/5] tests: qemuhotplugtest: Set the cpu version at source for PPC64 tests

2025-04-15 Thread Narayana Murty N
The commit 140ff3c5141 ("tests: qemuhotplugtest: Fix arch-specific parts of 'ppc64' test XMLs") fixated on the POWER9 in results xml which actually would be the host-cpu at the moment on the source tree. With updates to higher cpu versions this has to continuously be updated. Instead, update the te

[PATCH v4 4/5] cpu_map: Add POWER11 cpu model support

2025-04-15 Thread Narayana Murty N
Add POWER11 as a supported cpu model for ppc64. Signed-off-by: Narayana Murty N --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build| 1 + src/cpu_map/ppc64_POWER11.xml | 6 ++ tests/domaincapsdata/qemu_10.0.0.ppc64.xml | 1 + 4 files

[PATCH v3 0/5] Adding POWER11 CPU Support

2025-04-15 Thread Narayana Murty N
This patch series introduces the necessary changes to support the power11 CPU and power11 host in libvirt. Additionally, it updates the QEMU capabilities with the latest QEMU version v10.0.0-rc2 to include power11 in the capabilities tests.During testing of v2 patches found a bug in qemu which sets

[PATCH v4 5/5] cpu_ppc64: Add POWER11 hostmodel support and accept case insensitive

2025-04-15 Thread Narayana Murty N
QEMU has historically used uppercase CPU model names like "POWER8", "POWER9", etc. However, starting with commit c5354f54aa60 ("ppc: make cpu_model translation to type consistent"), QEMU began using lowercase CPU model names (e.g., "power8") for newer POWER generations. This shift in naming conven

Re: [PATCH v2 0/2] conf: use const virDomainDef pointers

2025-04-15 Thread Ján Tomko via Devel
On a Sunday in 2025, Roman Bogorodskiy wrote: Changes since v1: - Split domain_conf and bhyve changes into separate commits - Convert virDomainNetNotifyActualDevice() as well Roman Bogorodskiy (2): conf: use const virDomainDef pointers bhyve: use const virDomainDef pointer in bhyveBuildNetArg

Re: [PATCH v2 1/1] virsh: prevent potential NULL dereference

2025-04-15 Thread Michal Prívozník via Devel
On 4/14/25 15:32, Alexander Kuznetsov wrote: > virXPathString() can return NULL so we need to use STRNEQ_NULLABLE here > > Found by Linux Verification Center (linuxtesting.org) with Svace. > > Reported-by: Dmitry Fedin > Signed-off-by: Alexander Kuznetsov > --- > tools/virsh-completer-domain.c

[PATCH v4 1/5] tests: Pin pseries-2.7 tests to the version 7.0

2025-04-15 Thread Narayana Murty N
Support for the pseries-2.7 machine type in QEMU was officially removed in version 9.2 with qemu commit 445d3facffe8 ("ppc/spapr: remove deprecated machine pseries-2.7"). Instead of removing related tests, they are now pinned to the latest available capabilities version 7.0.0 to ensure continued fu