Re: [PATCH 0/1] qemu qapi: SIGSEGV small fix

2025-07-16 Thread Nikolai Barybin via Devel
On 7/3/25 12:19, Nikolai Barybin wrote: Hello everyone! When implementing some custom qemu capability I cought this bug when some string with '*' pattern is not contained in schema, and virQEMUQAPISchemaTraverseObject passes NULL ptr to virJSONValueObjectHasKey. Nikolai Barybin (1): qemu: q

[libvirt PATCH 0/2] tests: nssdata: add empty status file

2025-07-16 Thread Ján Tomko via Devel
A blurb is a short promotional piece accompanying a piece of creative work. It may be written by the author or publisher or quote praise from others. Blurbs were originally printed on the back or rear dust jacket of a book. With the development of the mass-market paperback, they were placed on both

[libvirt PATCH 1/2] DO NOT PUSH Revert "nss: Skip empty files and avoid use of uninitialized value"

2025-07-16 Thread Ján Tomko via Devel
From: Ján Tomko This reverts commit 63a3d70697dc44ef2f8b40f7c8e9aa869227a7da. --- tools/nss/libvirt_nss_leases.c | 9 ++--- tools/nss/libvirt_nss_macs.c | 9 ++--- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/tools/nss/libvirt_nss_leases.c b/tools/nss/libvirt_nss_lea

[libvirt PATCH 2/2] tests: nssdata: add empty status file

2025-07-16 Thread Ján Tomko via Devel
From: Ján Tomko Add a test to makee sure we will keep ignoring empty status files properly in the future. https://bugzilla.redhat.com/show_bug.cgi?id=2364285 Fixes: 63a3d70697dc44ef2f8b40f7c8e9aa869227a7da Signed-off-by: Ján Tomko --- tests/nssdata/virbr2.status | 0 1 file changed, 0 inserti

[PATCH 1/2] conf: introduce hardware UUID (hwuuid) element

2025-07-16 Thread Mark Cave-Ayland
The hardware UUID (hwuuid) element provides a mechanism to supply an external UUID to the guest, as opposed to the libvirt domain UUID. This is to allow for the scenario whereby a domain can be stopped, cloned and then started as a new domain without altering the guest-visible UUID. Add the elemen

[PATCH 0/2] Introduce hardware UUID (hwuuid) element

2025-07-16 Thread Mark Cave-Ayland
Following on from the discussions at [1] and more recently [2], this series introduces a new hardware UUID (hwuuid) element that allows an external UUID to be provided to the guest, as opposed to the libvirt domain UUID. The use case for this feature is to allow a domain to cloned and then restart

[PATCH 2/2] qemuxmlconftest: add tests for new hardware UUID (hwuuid) element

2025-07-16 Thread Mark Cave-Ayland
Add new 'hwuuid' and 'hwuuid-smbios-uuid-match' tests to verify that the new hardware UUID (hwuuid) element is working as intended. In particular the 'hwuuid-smbios-uuid-match' test is designed to ensure that the hwuuid and smbios UUIDs are always identical, similar to how the existing logic works

Re: [PATCH 2/6] nss: Move logging into a separate file and turn it temporarily on

2025-07-16 Thread Ján Tomko via Devel
On a Friday in 2025, Michal Privoznik via Devel wrote: From: Michal Privoznik Currently, when somebody wants to debug the NSS plugin, they have to change a line in libvirt_nss.h (to enable debug printings) and recompile the module. This may work for us, developers, but we can not expect this fr

Re: [PATCH 0/6] nss: Rework debugging

2025-07-16 Thread Ján Tomko via Devel
On a Friday in 2025, Michal Privoznik via Devel wrote: I've been debugging a problem with NSS plugin recently [1] and the fact that I had to recompile libvirt just to enable debugging printings for the NSS plugin turned out very inconvenient. Make the debug printings env var dependant and add a f

Re: [PATCH 1/1] qemu: qapi: fix potential SIGSEGV in virQEMUQAPISchemaTraverseObject()

2025-07-16 Thread Peter Krempa via Devel
On Thu, Jul 03, 2025 at 13:19:07 +0300, Nikolai Barybin via Devel wrote: > We need to check obj ptr before passing it to > virJSONValueObjectHasKey(). If it's NULL it will fail with SIGSEGV. > > Signed-off-by: Nikolai Barybin > --- > src/qemu/qemu_qapi.c | 2 +- > 1 file changed, 1 insertion(+),

Re: [PATCH 1/1] qemu: qapi: fix potential SIGSEGV in virQEMUQAPISchemaTraverseObject()

2025-07-16 Thread Peter Krempa via Devel
On Thu, Jul 03, 2025 at 13:19:07 +0300, Nikolai Barybin via Devel wrote: Please also fix your git configuration: https://libvirt.org/submitting-patches.html#git-configuration Otherwise the author will be wrong (Nikolai Barybin via Devel) unless fixed manually due to the DMARC countermeasures th

[PATCH] virshFindDisk: fix NULL-dereference of xmlCopyNode() result

2025-07-16 Thread Anastasia Belova
xmlCopyNode() may return NULL. Add a check and log an error in this case. Found by Linux Verification Center (linuxtesting.org) with Svace. Fixes: 22766a1a53 ("virshFindDisk: Sanitize use of 'tmp' variable") Signed-off-by: Anastasia Belova --- tools/virsh-domain.c | 4 1 file changed, 4 in

[PATCH v2 1/1] nwfilter: Check before removing and reinserting iptable base chains

2025-07-16 Thread Dion Bosschieter
Upon VM bootstrapping (start,restore,incoming migration) iptablesCreateBaseChainsFW is called and unconditionally deletes and reinserts top-level firewall chain jumps (e.g. INPUT, FORWARD rules). This briefly allows packets to continue, allowing packets through until the base chain iptables -I comm

[PATCH v2 0/1] nwfilter: Check before removing and reinserting iptable base chains

2025-07-16 Thread Dion Bosschieter
Thanks for the feedback. I've applied the iptables -L with a callback handler. The callback handler then decides whether or not to create the base chains. I changed the commit message from "nwfilter: Avoid firewall hole during VM startup by checking rule presence" to "nwfilter: Check before removi

[RFC PATCH 4/6] tests/docker: add sparc-leon-cross container image

2025-07-16 Thread Alex Bennée
The distros no longer ship sparc compilers so we must use some others. The best I could find was Frontgrade Gasiler who ship gcc binaries: https://www.gaisler.com/compilers-operating-systems Add a simple image for building the test cases. Signed-off-by: Alex Bennée --- .../dockerfiles/sparc-

[RFC PATCH 1/6] tests/tcg: special case sparc test cases

2025-07-16 Thread Alex Bennée
Due to an existing bug #1771 we can't run anything we build so we have to suppress the normal multiarch build. As we can't have duplicate build rules we need to copy the bits we need from the normal multiarch Makefile so we can redefine all the run-% rules. For signals and vma-pthread they also ne

[RFC PATCH 0/6] Fix building of sparc/sparc32plus test cases

2025-07-16 Thread Alex Bennée
We didn't have any reliable way to build sparc test cases. I have found someone who ships a compiler but the binaries still don't run due to the need for CASA. I'm posting mainly for those who actually care who might want to fix up the remaining cases. Alex. Alex Bennée (6): tests/tcg: special

[RFC PATCH 3/6] configure: update sparc and sparc32plus target compiler detection

2025-07-16 Thread Alex Bennée
The sparc64 compiler can nominally be configured to compile 32 bit and v8plus binaries although in practice no one is now shipping them. Signed-off-by: Alex Bennée --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 2b2b3d6597..3651c

[RFC PATCH 2/6] tests/tcg: special case sparc32plus test cases

2025-07-16 Thread Alex Bennée
We can re-use the sparc Makefile to ensure we build but don't run the tests. Signed-off-by: Alex Bennée --- tests/tcg/Makefile.target | 2 +- tests/tcg/sparc32plus | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 12 tests/tcg/sparc32plus diff --git a/tests/tcg/Makefil

[RFC PATCH 6/6] docs/about: deprecate add sparc/sparc32plus-*-user

2025-07-16 Thread Alex Bennée
Even with a toolchain *-user is still broken. Maybe we should just deprecate the target. I haven't deprecated for system as we have functional tests that work and will continue to do so. Signed-off-by: Alex Bennée --- docs/about/deprecated.rst | 8 1 file changed, 8 insertions(+) diff

[RFC PATCH 5/6] configure: enable the container fallbacks for sparc/sparc32plus

2025-07-16 Thread Alex Bennée
Signed-off-by: Alex Bennée --- configure | 6 ++ 1 file changed, 6 insertions(+) diff --git a/configure b/configure index 3651cc3085..f187480d3a 100755 --- a/configure +++ b/configure @@ -1442,6 +1442,8 @@ probe_target_compiler() { riscv64) container_hosts=x86_64 ;; s390x) containe

Re: [RFC PATCH 6/6] docs/about: deprecate add sparc/sparc32plus-*-user

2025-07-16 Thread Thomas Huth via Devel
On 16/07/2025 12.54, Alex Bennée wrote: Even with a toolchain *-user is still broken. Maybe we should just deprecate the target. I haven't deprecated for system as we have functional tests that work and will continue to do so. Signed-off-by: Alex Bennée --- docs/about/deprecated.rst | 8 +

Re: [PATCH 3/6] nss: Make logging conditional on an envvar

2025-07-16 Thread Ján Tomko via Devel
On a Friday in 2025, Michal Privoznik via Devel wrote: From: Michal Privoznik As promised in previous commit, make NSS modules silent by default and enable debug printings if LIBVIRT_NSS_DEBUG envvar is set. Signed-off-by: Michal Privoznik --- docs/nss.rst| 13 + to

[PATCH v2 1/5] bhyve: support serial type 'tcp'

2025-07-16 Thread Roman Bogorodskiy
In addition to the nmdm consoles, bhyve also supports a tcp console. It's configured with: .. -l com1,tcp=127.0.0.1:12345 Then a user could connect to the guest console port 0 by making a tcp connection to the host's 127.0.0.1:12345. In the domain XML this configuration is represented as:

[PATCH v2 0/5] bhyve: TCP console support

2025-07-16 Thread Roman Bogorodskiy
Changes since v1: I misunderstood semantics of the 'mode' attribute of the element, and used 'connect' while I should have used 'bind', because bhyve listens on the TCP socket and client connects to using using netcat (or any other similar tool). Now it's using the 'bind' value. Other changes: a

[PATCH v2 2/5] bhyve: increase number of supported consoles to 4

2025-07-16 Thread Roman Bogorodskiy
Recent versions of bhyve support 4 com ports instead of just 2. Thus, allow to use 4 console devices. Also, there was a bug previously because the condition was "if (chr->target.port > 2)", but as target.port start with 0 and "com" ports start with 1, this condition allows com3 to be used. As bhy

[PATCH v2 3/5] docs: drvbhyve: document TCP console support

2025-07-16 Thread Roman Bogorodskiy
Signed-off-by: Roman Bogorodskiy Reviewed-by: Daniel P. Berrangé --- docs/drvbhyve.rst | 19 +++ 1 file changed, 19 insertions(+) diff --git a/docs/drvbhyve.rst b/docs/drvbhyve.rst index 7eec4a2123..0962bccef4 100644 --- a/docs/drvbhyve.rst +++ b/docs/drvbhyve.rst @@ -619,3 +619

[PATCH v2 5/5] bhyve: sync error messages

2025-07-16 Thread Roman Bogorodskiy
Use the same error messages for serial devices validation which are already used in bhyve_domain.c Signed-off-by: Roman Bogorodskiy --- src/bhyve/bhyve_command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 18

[PATCH v2 4/5] bhyve: validate serial devices validation

2025-07-16 Thread Roman Bogorodskiy
Extend bhyveDomainDeviceDefValidate() to check that: - only 'nmdm' or 'tcp' serial devices are used, - serial device count is not more than supported, - only listening raw TCP sockets are used. Signed-off-by: Roman Bogorodskiy --- src/bhyve/bhyve_domain.c | 27 +++ 1