Re: RFC: libvirt-tck bhyve/FreeBSD support

2025-04-14 Thread Roman Bogorodskiy
Daniel P. Berrangé wrote: > On Mon, Apr 14, 2025 at 02:36:11PM +0200, Roman Bogorodskiy wrote: > > Hi, > > > > I'd like to test the bhyve driver using libvirt-tck, which seems to be > > very useful both from the continuous integration perspective, > > and making the bhyve driver closer to other

Re: RFC: libvirt-tck bhyve/FreeBSD support

2025-04-14 Thread Daniel P . Berrangé via Devel
On Mon, Apr 14, 2025 at 02:36:11PM +0200, Roman Bogorodskiy wrote: > Hi, > > I'd like to test the bhyve driver using libvirt-tck, which seems to be > very useful both from the continuous integration perspective, > and making the bhyve driver closer to other drivers to improve > integration with ot

Re: [PATCH] bhyve: capabilities: advertise RNG device support

2025-04-14 Thread Daniel P . Berrangé via Devel
On Mon, Apr 14, 2025 at 07:45:25PM +0200, Roman Bogorodskiy wrote: > Signed-off-by: Roman Bogorodskiy > --- > src/bhyve/bhyve_capabilities.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c > index 37ae5d2872..36

[PATCH] bhyve: capabilities: advertise RNG device support

2025-04-14 Thread Roman Bogorodskiy
Signed-off-by: Roman Bogorodskiy --- src/bhyve/bhyve_capabilities.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c index 37ae5d2872..36a092a819 100644 --- a/src/bhyve/bhyve_capabilities.c +++ b/src/bhyve/bhyve_capabi

Re: [PATCH v1 1/1] rpc: Add the retry argument for virNetTLSSession{Read,Write}

2025-04-14 Thread Daniel P . Berrangé via Devel
On Mon, Apr 14, 2025 at 09:51:32AM +0800, Yong Huang wrote: > On Fri, Apr 11, 2025 at 5:47 PM Daniel P. Berrangé > wrote: > > > On Tue, Apr 08, 2025 at 10:27:51AM +0800, yong.hu...@smartx.com wrote: > > > From: Hyman Huang > > > > > > As advised by the GNU TLS, the caller should attempt again >

RFC: libvirt-tck bhyve/FreeBSD support

2025-04-14 Thread Roman Bogorodskiy
Hi, I'd like to test the bhyve driver using libvirt-tck, which seems to be very useful both from the continuous integration perspective, and making the bhyve driver closer to other drivers to improve integration with other tooling. As a small proof-of-concept I made just a single test 060-persist

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

2025-04-14 Thread Alexander Kuznetsov
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 Signed-off-by: Alexander Kuznetsov --- src/nwfilter/nwfil

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

2025-04-14 Thread Alexander Kuznetsov
v2: - switch use g_clear_pointer instead of removing virNWFilterInstReset call Alexander Kuznetsov (1): nwfilter: Avoid possible double free in virNWFilterInstReset() src/nwfilter/nwfilter_gentech_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.42.4

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

2025-04-14 Thread Alexander Kuznetsov
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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

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

2025-04-14 Thread Alexander Kuznetsov
v2: - switch to use STRNEQ_NULLABLE instead of simple nullness check Alexander Kuznetsov (1): virsh: prevent potential NULL dereference tools/virsh-completer-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.42.4

[PATCH] virNWFilterIncludeDefToRuleInst: Prevent potential double g_free

2025-04-14 Thread Alexander Kuznetsov
If virNWFilterDefToInst returns -1, it has already called virNWFilterInstReset. Remove the additional call to prevent a double g_free Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Dmitry Fedin Signed-off-by: Alexander Kuznetsov --- src/nwfilter/nwfilter_gentech

Re: [PATCH] nss: Fix memory leak in findLease

2025-04-14 Thread Peter Krempa via Devel
On Mon, Apr 14, 2025 at 15:06:09 +0300, Alexander Kuznetsov wrote: > path is allocated by asprintf() and must be freed later if realloc() fails or > at > the end of each while() iteration > > Move the free() call out of LIBVIRT_NSS_GUEST macro and add another one if > realloc() fails > > Found b

Re: How to find the actually schedulable CPUs in a Linux + cgroups setup?

2025-04-14 Thread Martin Kletzander via Devel
On Fri, Apr 04, 2025 at 04:32:42PM +0300, Biser Milanov via Devel wrote: Hi, Right now, looking at the QEMU driver, libvirt supports listing all of the present CPUs on the hypervisor via /sys/devices/system/cpu/present. For systems where cgroups with exclusive CPU bits are configured, however, t

Re: [PATCH] nss: Fix memory leak in findLease

2025-04-14 Thread Peter Krempa via Devel
On Mon, Apr 14, 2025 at 15:06:09 +0300, Alexander Kuznetsov wrote: > path is allocated by asprintf() and must be freed later if realloc() fails or > at > the end of each while() iteration > > Move the free() call out of LIBVIRT_NSS_GUEST macro and add another one if > realloc() fails > > Found b

Re: [PATCH] nss: Fix memory leak in findLease

2025-04-14 Thread Peter Krempa via Devel
On Mon, Apr 14, 2025 at 13:27:16 +0100, Daniel P. Berrangé wrote: > On Mon, Apr 14, 2025 at 02:25:05PM +0200, Peter Krempa wrote: > > On Mon, Apr 14, 2025 at 13:20:55 +0100, Daniel P. Berrangé via Devel wrote: > > > On Mon, Apr 14, 2025 at 03:06:09PM +0300, Alexander Kuznetsov wrote: [...] > > >

Re: [PATCH] nss: Fix memory leak in findLease

2025-04-14 Thread Daniel P . Berrangé via Devel
On Mon, Apr 14, 2025 at 02:25:05PM +0200, Peter Krempa wrote: > On Mon, Apr 14, 2025 at 13:20:55 +0100, Daniel P. Berrangé via Devel wrote: > > On Mon, Apr 14, 2025 at 03:06:09PM +0300, Alexander Kuznetsov wrote: > > > path is allocated by asprintf() and must be freed later if realloc() > > > fail

Re: [PATCH] nss: Fix memory leak in findLease

2025-04-14 Thread Peter Krempa via Devel
On Mon, Apr 14, 2025 at 13:20:55 +0100, Daniel P. Berrangé via Devel wrote: > On Mon, Apr 14, 2025 at 03:06:09PM +0300, Alexander Kuznetsov wrote: > > path is allocated by asprintf() and must be freed later if realloc() fails > > or at > > the end of each while() iteration > > > > Move the free()

Re: [PATCH] nss: Fix memory leak in findLease

2025-04-14 Thread Daniel P . Berrangé via Devel
On Mon, Apr 14, 2025 at 03:06:09PM +0300, Alexander Kuznetsov wrote: > path is allocated by asprintf() and must be freed later if realloc() fails or > at > the end of each while() iteration > > Move the free() call out of LIBVIRT_NSS_GUEST macro and add another one if > realloc() fails > > Found

Re: [PATCH] virNWFilterIncludeDefToRuleInst: Prevent potential double g_free

2025-04-14 Thread Peter Krempa via Devel
On Mon, Apr 14, 2025 at 15:02:35 +0300, Alexander Kuznetsov wrote: > If virNWFilterDefToInst returns -1, it has already called > virNWFilterInstReset. > Remove the additional call to prevent a double g_free > > Found by Linux Verification Center (linuxtesting.org) with Svace. > > Reported-by: Dm

Re: [PATCH] virsh: prevent potential NULL dereference

2025-04-14 Thread Peter Krempa via Devel
On Mon, Apr 14, 2025 at 14:56:03 +0300, Alexander Kuznetsov wrote: > 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 > ---

[PATCH] nss: Fix memory leak in findLease

2025-04-14 Thread Alexander Kuznetsov
path is allocated by asprintf() and must be freed later if realloc() fails or at the end of each while() iteration Move the free() call out of LIBVIRT_NSS_GUEST macro and add another one if realloc() fails Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Dmitry Fedi

Re: [PATCH 1/2] NEWS: bhyve: document new features

2025-04-14 Thread Michal Prívozník via Devel
On 4/13/25 08:12, Roman Bogorodskiy wrote: > Document the virtio random number generator device support > and support. > > Signed-off-by: Roman Bogorodskiy > --- > NEWS.rst | 14 ++ > 1 file changed, 14 insertions(+) > Reviewed-by: Michal Privoznik Michal

Re: [PATCH 0/2] vsh: Fix one memleak and const correctness

2025-04-14 Thread Jiri Denemark via Devel
On Mon, Apr 14, 2025 at 10:10:34 +0200, Michal Privoznik wrote: > *** BLURB HERE *** > > Michal Prívozník (2): > vsh: Free commands in vshDeinit() > vsh: Turn _vshControl::progname into a const string > > tools/vsh.c | 1 + > tools/vsh.h | 2 +- > 2 files changed, 2 insertions(+), 1 deletion

Re: [PATCH 2/2] docs: drvbhyve: document virtio-rnd support

2025-04-14 Thread Michal Prívozník via Devel
On 4/13/25 08:12, Roman Bogorodskiy wrote: > - Document the virtio random number generator device support > - While here, remove mention of the specific FreeBSD version such as >10-STABLE, and just refer to the latest supported release. > > Signed-off-by: Roman Bogorodskiy > --- > docs/drv

[PATCH 2/2] vsh: Turn _vshControl::progname into a const string

2025-04-14 Thread Michal Privoznik via Devel
From: Michal Privoznik The aim of the progname member of the _vshControl struct is to point to argv[0] which is then used in vshOutputLogFile() to create a prefix for a log message. But the member is never modified (nor it should be) and thus can be a const char *. Signed-off-by: Michal Privozni

[PATCH 1/2] vsh: Free commands in vshDeinit()

2025-04-14 Thread Michal Privoznik via Devel
From: Michal Privoznik Whether virsh/virt-admin is running in interactive or non-interactive mode, vshControl::cmd contains the batch of last executed commands as a linked list. Just look into vshCommandParse(). Free the linked list in vshDeinit() to avoid memleak. 3,312 bytes in 3 blocks are

[PATCH 0/2] vsh: Fix one memleak and const correctness

2025-04-14 Thread Michal Privoznik via Devel
*** BLURB HERE *** Michal Prívozník (2): vsh: Free commands in vshDeinit() vsh: Turn _vshControl::progname into a const string tools/vsh.c | 1 + tools/vsh.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.49.0

Re: [PATCH v3 0/2] deprecate some block-job- APIs

2025-04-14 Thread Vladimir Sementsov-Ogievskiy
On 09.04.25 11:42, Vladimir Sementsov-Ogievskiy wrote: This is for 10.1, of course. v3: fix wording, typos v2: Update documentation: add patch 01 v1 was: [PATCH] [for-10.1] qapi/block-core: derpecate some block-job- APIs Supersedes: <20250401155730.103718-1-vsement...@yandex-team.ru> Vladimir