[PATCH] virSocketAddrPrefixToNetmask: Prevent undefined behaviour on bitshifts on signed integer

2025-06-17 Thread Peter Krempa via Devel
From: Peter Krempa Shifting bits into the sign bit is undefined behaviour in C although both gcc and clang handle it as expected. Since the value is used as unsigned convert it to unsigned int. For code readability use 'if' statement instead of a ternary. Closes: https://gitlab.com/libvirt/libv

Re: [PATCH] security_manager: Don't leak seclabel in virSecurityManagerGenLabel()

2025-06-17 Thread Ján Tomko via Devel
On a Monday in 2025, Michal Privoznik via Devel wrote: From: Michal Privoznik When a domain is being started, seclabels are generated for it. This is handled in virSecurityManagerGenLabel() which can either find pre-existing seclabel in domain def or generate a new one. At any rate, domainGenSe

Re: [PATCH 0/6] Various fixes and cleanups

2025-06-17 Thread Ján Tomko via Devel
On a Tuesday in 2025, Peter Krempa via Devel wrote: A collection of random one-off fixes for issues where the root cause was analyzed by the reporter and cleanups that I've recently accumulated. Peter Krempa (6): storage_file_probe: Use named initializer for 'struct FileTypeInfo' virQEMUCapsFi

Re: [PATCH 0/6] Various fixes and cleanups

2025-06-17 Thread Michal Prívozník via Devel
On 6/17/25 15:43, Peter Krempa via Devel wrote: > A collection of random one-off fixes for issues where the root cause was > analyzed by the reporter and cleanups that I've recently accumulated. > > Peter Krempa (6): > storage_file_probe: Use named initializer for 'struct FileTypeInfo' > virQE

Re: [PATCH 6/6] tlscert: Don't force 'keyEncipherment' for ECDSA and ECDH

2025-06-17 Thread Daniel P . Berrangé via Devel
On Tue, Jun 17, 2025 at 03:43:59PM +0200, Peter Krempa via Devel wrote: > From: Peter Krempa > > Per RFC8813 [1] which amends RFC5580 [2] ECDSA, ECDH, and ECMQV > algorithms must not have 'keyEncipherment' present, but our code did > check it. Add exemption for known algorithms which don't use it

[PATCH 6/6] tlscert: Don't force 'keyEncipherment' for ECDSA and ECDH

2025-06-17 Thread Peter Krempa via Devel
From: Peter Krempa Per RFC8813 [1] which amends RFC5580 [2] ECDSA, ECDH, and ECMQV algorithms must not have 'keyEncipherment' present, but our code did check it. Add exemption for known algorithms which don't use it. [1] https://datatracker.ietf.org/doc/rfc8813/ [2] https://datatracker.ietf.org/

[PATCH 4/6] storage: parthelper: Use if/else instead of ternary operator

2025-06-17 Thread Peter Krempa via Devel
From: Peter Krempa Signed-off-by: Peter Krempa --- src/storage/parthelper.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c index 1169ebfb64..94aac34f7c 100644 --- a/src/storage/parthelper.c +++ b/src/storage/parthel

[PATCH 5/6] storage: disk: Properly handle partition numbers separated by 'p'

2025-06-17 Thread Peter Krempa via Devel
From: Peter Krempa The 'p' separator for partitions is now common also for NVMe devices. Fix the algorithm to extract the partition number to always consider it. The fix is based on suggestion in the issue mentioned below. Closes: https://gitlab.com/libvirt/libvirt/-/issues/239 Signed-off-by: P

[PATCH 3/6] virshPrintJobProgress: Don't rewrite migration status line on non-terminals

2025-06-17 Thread Peter Krempa via Devel
From: Peter Krempa On non-terminals print each progress report on a new line. Fix based on suggestion in the issue report. Closes: https://gitlab.com/libvirt/libvirt/-/issues/756 Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deleti

[PATCH 2/6] virQEMUCapsFindBinary: Refactor local variables

2025-06-17 Thread Peter Krempa via Devel
From: Peter Krempa Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4251ad2d92..2ba5462bb2 100644 --- a/src/qemu/qemu_capabilities.c +++ b/s

[PATCH 1/6] storage_file_probe: Use named initializer for 'struct FileTypeInfo'

2025-06-17 Thread Peter Krempa via Devel
From: Peter Krempa Signed-off-by: Peter Krempa --- src/storage_file/storage_file_probe.c | 174 ++ 1 file changed, 119 insertions(+), 55 deletions(-) diff --git a/src/storage_file/storage_file_probe.c b/src/storage_file/storage_file_probe.c index 26f8d63e9a..82cea28b20

[PATCH 0/6] Various fixes and cleanups

2025-06-17 Thread Peter Krempa via Devel
A collection of random one-off fixes for issues where the root cause was analyzed by the reporter and cleanups that I've recently accumulated. Peter Krempa (6): storage_file_probe: Use named initializer for 'struct FileTypeInfo' virQEMUCapsFindBinary: Refactor local variables virshPrintJobPr

Re: [PATCH v4 00/27] hw/i386/pc: Remove deprecated 2.6 and 2.7 PC machines

2025-06-17 Thread Zhao Liu
Hi Peter, > Finally there's > > DEFINE_PROP_BOOL("l3-cache", X86CPU, enable_l3_cache, true), > > which is exposed to the users via cache mode setting of cpu: > > https://www.libvirt.org/formatdomain.html#cpu-model-and-topology > > look for 'cache'. I found this link doesn't mention "l3-cache