From nobody Sun Sep 28 15:28:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756725922; cv=none; d=zohomail.com; s=zohoarc; b=J6n62vjIak/AahMQgFPcpQILocOcyEGjlwDEfQMlqB3XHL2Ur15ey+cOZc02xaXjydRsuHXqJO2VabuoFHcmrH5OnJI/UminQprmHncNZ0SSUXvEnHYSxVp7ygGOwsod3/K0WqWNlsQDC3jWfuY9cXBrlOc93LyPeyyLYd52J9A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756725922; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=og6ymulh9UmaMSIescETQPevhxzm1aJMZFMSGR8zlFk=; b=DsAD4jY97GNHGxxy3xItGTIdvR2Rs4eVkt4gHxnkxWh2fimD35cJkZPypH+X7puO2pOBu3Jhr3KFwhxvt5T9P2IgTR48zk7lD0yT0sdvpITPEA5vjVCKRzcunQDmNsP1FIXNibwl1SQNyrd8NtuT7nYniWACSXf+yQwqrJnQS+I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756725922329212.32103540408673; Mon, 1 Sep 2025 04:25:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ut2eV-0000KY-QI; Mon, 01 Sep 2025 07:24:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eC-0000F8-EX for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eA-00065k-Fw for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:28 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-436-yZ1Hsw8JPZGABBRb-SEpsQ-1; Mon, 01 Sep 2025 07:24:22 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 076C5180036E; Mon, 1 Sep 2025 11:24:21 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.44.32.80]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3391F1800446; Mon, 1 Sep 2025 11:24:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756725865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=og6ymulh9UmaMSIescETQPevhxzm1aJMZFMSGR8zlFk=; b=ahzJWL+w3cUsrLluLC85aODAh6f9S8vz9REheRpQGn6XP7l2LdyQW/2aoOMsiiqxctSaAp iDCyOSv1d1Vs2xKzBb6zWP2uD1+VFfpmPtYW8a7diM3K314ZA0uTGkoOKF6iKDwL9ehueN jxn58EZvNQvRCJt5Gl+V44uBl3lyw1g= X-MC-Unique: yZ1Hsw8JPZGABBRb-SEpsQ-1 X-Mimecast-MFC-AGG-ID: yZ1Hsw8JPZGABBRb-SEpsQ_1756725861 From: Kostiantyn Kostiuk To: qemu-devel@nongnu.org, Peter Maydell , Stefan Hajnoczi , Richard Henderson Subject: [PULL v2 1/9] qga: Fix ubsan warning Date: Mon, 1 Sep 2025 14:24:05 +0300 Message-ID: <20250901112413.114314-2-kkostiuk@redhat.com> In-Reply-To: <20250901112413.114314-1-kkostiuk@redhat.com> References: <20250901112413.114314-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1756725923409116600 From: Thomas Huth When compiling QEMU with --enable-ubsan there is a undefined behavior warning when running "make check": .../qga/commands-linux.c:452:15: runtime error: applying non-zero offset 5= to null pointer #0 0x55ea7b89450c in build_guest_fsinfo_for_pci_dev ..../qga/commands-linu= x.c:452:15 Fix it by avoiding the additional pointer variable here and use an "offset" integer variable instead. Signed-off-by: Thomas Huth Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Kostiantyn Kostiuk Link: https://lore.kernel.org/qemu-devel/20250730072709.27077-1-thuth@redha= t.com Signed-off-by: Kostiantyn Kostiuk --- qga/commands-linux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 9dc0c82503..4a09ddc760 100644 --- a/qga/commands-linux.c +++ b/qga/commands-linux.c @@ -400,10 +400,10 @@ static bool build_guest_fsinfo_for_pci_dev(char const= *syspath, Error **errp) { unsigned int pci[4], host, hosts[8], tgt[3]; - int i, nhosts =3D 0, pcilen; + int i, offset, nhosts =3D 0, pcilen; GuestPCIAddress *pciaddr =3D disk->pci_controller; bool has_ata =3D false, has_host =3D false, has_tgt =3D false; - char *p, *q, *driver =3D NULL; + char *p, *driver =3D NULL; bool ret =3D false; =20 p =3D strstr(syspath, "/devices/pci"); @@ -445,13 +445,13 @@ static bool build_guest_fsinfo_for_pci_dev(char const= *syspath, =20 p =3D strstr(syspath, "/ata"); if (p) { - q =3D p + 4; + offset =3D 4; has_ata =3D true; } else { p =3D strstr(syspath, "/host"); - q =3D p + 5; + offset =3D 5; } - if (p && sscanf(q, "%u", &host) =3D=3D 1) { + if (p && sscanf(p + offset, "%u", &host) =3D=3D 1) { has_host =3D true; nhosts =3D build_hosts(syspath, p, has_ata, hosts, ARRAY_SIZE(hosts), errp); --=20 2.50.1 From nobody Sun Sep 28 15:28:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756725894; cv=none; d=zohomail.com; s=zohoarc; b=P/eLoZYOC8l/kDHsy42Xt1OrlLOGUhIyvISuM37Mp8zrLkcPlhWXBIyz5eOZep5eX9ccuEwmU8D0GdwcSEwP/9/Z/0C18U7eSMnHd/cPlUEb0mI2CYqRylihRdic9oVEU16yrVp9mkb3wR26tg8UojpURbnJsWcBrapFyBPyiz0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756725894; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ujlFs9aXcF9f/wxxVzM/Vww2KayqUQ2rRaBGwtYJtpc=; b=CG+/AqHgx8s4t/Qk5jVudoSfOBy0PsmVyQ3AohcJQSz3LjAQ7JwbfLHVYg614bOJrE5QZeuzfrLhKxajq0QkEOUgOt7AyE6Tl6p+aVr6dS+MqbKmGK50yAErsBvwMa/091d6p9FUPRDhrmigWPpn/OeffTL3rSjK2W1j6YcZkcw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756725894363884.8603504169021; Mon, 1 Sep 2025 04:24:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ut2eM-0000HM-T5; Mon, 01 Sep 2025 07:24:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eD-0000FG-Nw for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eA-00065u-S4 for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:29 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-496-GlFzNgjvNuy4_wXpUhZI4Q-1; Mon, 01 Sep 2025 07:24:24 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 37DD3195609D; Mon, 1 Sep 2025 11:24:23 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.44.32.80]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 952CE180029C; Mon, 1 Sep 2025 11:24:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756725865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ujlFs9aXcF9f/wxxVzM/Vww2KayqUQ2rRaBGwtYJtpc=; b=bO04Oy+QeaWpgFc9JESC2Fo1chxjP0N9TppfWMBO4UKAusVoy/0wSrziWpepoKTtHqmdjO 8sETBWrpdTOkSGB/RDP1Sp5/vG0H9QKe9ciQ+/Geg4J2gIm4ttNV6behNvTfR7Tk7PSVm2 2FYQaS4jIOy4AJ4hg2YGwgx5u+uQkms= X-MC-Unique: GlFzNgjvNuy4_wXpUhZI4Q-1 X-Mimecast-MFC-AGG-ID: GlFzNgjvNuy4_wXpUhZI4Q_1756725863 From: Kostiantyn Kostiuk To: qemu-devel@nongnu.org, Peter Maydell , Stefan Hajnoczi , Richard Henderson Subject: [PULL v2 2/9] qga: fix potentially not initialized nr_volumes in qga_vss_fsfreeze() Date: Mon, 1 Sep 2025 14:24:06 +0300 Message-ID: <20250901112413.114314-3-kkostiuk@redhat.com> In-Reply-To: <20250901112413.114314-1-kkostiuk@redhat.com> References: <20250901112413.114314-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1756725897404116600 Content-Type: text/plain; charset="utf-8" From: "Denis V. Lunev" In this function we could have this variable not initialized. If this could be acceptable on error, the variable could be left not initialized f.e. as follows: void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset) { ... if (mountpoints) { ... if (num_mount_points =3D=3D 0) { /* If there is no valid mount points, just exit. */ goto out; } } ... if (!mountpoints) { ... if (num_fixed_drives =3D=3D 0) { goto out; /* If there is no fixed drive, just exit. */ } } ... } Stay on safe side, initialize the variable at the beginning. Signed-off-by: Denis V. Lunev CC: Kostiantyn Kostiuk CC: Michael Roth Reviewed-by: Kostiantyn Kostiuk Link: https://lore.kernel.org/qemu-devel/20250807133221.1135453-1-den@openv= z.org Signed-off-by: Kostiantyn Kostiuk --- qga/vss-win32.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qga/vss-win32.c b/qga/vss-win32.c index f444a25a70..b272bfc782 100644 --- a/qga/vss-win32.c +++ b/qga/vss-win32.c @@ -157,6 +157,8 @@ void qga_vss_fsfreeze(int *nr_volume, bool freeze, .errp =3D errp, }; =20 + *nr_volume =3D 0; + g_assert(errp); /* requester.cpp requires it */ func =3D (QGAVSSRequesterFunc)GetProcAddress(provider_lib, func_name); if (!func) { --=20 2.50.1 From nobody Sun Sep 28 15:28:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756725945; cv=none; d=zohomail.com; s=zohoarc; b=EE8uOuuKp5luchq4G8w2ri2YP9FCNmCHXsfajB9uyQsGUSbJYtMNkaUByhm98AgChVlr9yQodl8zSw/fCzS7FwMAJ0AvPSidw164DfKflcRPhFgZCkptW9htMhdjBTRdJMfF2iKkOQHS1BhjDNxY55jcwFuTfRuBlHy9b6gqFew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756725945; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=BSdjMYWo+86VX8GX3Xm4s2LHLgpFxbBibOQ/p953Ays=; b=W8A6qitiaHWkmCA5RqJNA7cv5EpjPtuZK8UMMuozIjWpjPpgzVjoXqCe1giRR84GBhXDsmG2vWn8sJqK6BMMHVe89PrPhFiB1DsgiKQ7nSKbi+ZsLaXO68OyNOjp9QlHUb3Xftt7GUtCI/x5HXyKFLEAUSV3MavysgnEd6U21r0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756725945932483.02439051152817; Mon, 1 Sep 2025 04:25:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ut2eZ-0000Nv-7I; Mon, 01 Sep 2025 07:24:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eJ-0000HF-2N for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eG-00067r-PI for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:34 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-193-_I9UQPjyN6u7pjJiZeVitw-1; Mon, 01 Sep 2025 07:24:26 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 709E1180028D; Mon, 1 Sep 2025 11:24:25 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.44.32.80]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CED1F1800294; Mon, 1 Sep 2025 11:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756725869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BSdjMYWo+86VX8GX3Xm4s2LHLgpFxbBibOQ/p953Ays=; b=UWCIwa7nItLOoCowNjC28eDrXGuKUA4GuiWEm19wOiCML74GpLxFnsZoz2xrlaGyNqSKoc mLD5upYTXv3lrdi8276GkIybEXS1Sf6NiI0sLRJ92ujI8M3XytAaZa/s5d5U4EJg6n30WO /jV9qLu5rpgSnmAGAMZVaEygr+x6jr4= X-MC-Unique: _I9UQPjyN6u7pjJiZeVitw-1 X-Mimecast-MFC-AGG-ID: _I9UQPjyN6u7pjJiZeVitw_1756725865 From: Kostiantyn Kostiuk To: qemu-devel@nongnu.org, Peter Maydell , Stefan Hajnoczi , Richard Henderson Subject: [PULL v2 3/9] qga-vss: Replace asserts with condition and report error Date: Mon, 1 Sep 2025 14:24:07 +0300 Message-ID: <20250901112413.114314-4-kkostiuk@redhat.com> In-Reply-To: <20250901112413.114314-1-kkostiuk@redhat.com> References: <20250901112413.114314-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1756725947721124100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Yan Vugenfirer Link: https://lore.kernel.org/qemu-devel/20250825145241.170717-2-kkostiuk@r= edhat.com Signed-off-by: Kostiantyn Kostiuk --- qga/vss-win32/requester.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp index 4401d55e3a..bc260abb96 100644 --- a/qga/vss-win32/requester.cpp +++ b/qga/vss-win32/requester.cpp @@ -347,7 +347,12 @@ void requester_freeze(int *num_vols, void *mountpoints= , ErrorSet *errset) goto out; } =20 - assert(pCreateVssBackupComponents !=3D NULL); + if (!pCreateVssBackupComponents) { + err_set(errset, (HRESULT)ERROR_PROC_NOT_FOUND, + "CreateVssBackupComponents proc address absent. Did you ca= ll requester_init()?"); + goto out; + } + hr =3D pCreateVssBackupComponents(&vss_ctx.pVssbc); if (FAILED(hr)) { err_set(errset, hr, "failed to create VSS backup components"); @@ -579,8 +584,16 @@ void requester_thaw(int *num_vols, void *mountpints, E= rrorSet *errset) /* Tell the provider that the snapshot is finished. */ SetEvent(vss_ctx.hEventThaw); =20 - assert(vss_ctx.pVssbc); - assert(vss_ctx.pAsyncSnapshot); + if (!vss_ctx.pVssbc) { + err_set(errset, (HRESULT)VSS_E_BAD_STATE, + "CreateVssBackupComponents is missing. Did you freeze the = volumes?"); + return; + } + if (!vss_ctx.pAsyncSnapshot) { + err_set(errset, (HRESULT)VSS_E_BAD_STATE, + "AsyncSnapshot set is missing. Did you freeze the volumes?= "); + return; + } =20 HRESULT hr =3D WaitForAsync(vss_ctx.pAsyncSnapshot); switch (hr) { --=20 2.50.1 From nobody Sun Sep 28 15:28:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756725935; cv=none; d=zohomail.com; s=zohoarc; b=ZXMoY2HHQJoeNRqBqswqaQmztvQsml9n/ttVL2q43eMYxM3iqqXvKpabH+OVkEy4wdkB5aIkEhr+wtlXwY0vvSV3ZZ6c6uef3uNCrtSR6oX8mnwXEaFkQGN0G4hFtJIYfXL/6ev586qBDD4Fm+MQRGGLb50XQrS1lAQfzoKJPeY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756725935; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=RusSw3DLmNp2e2rRKWn+E9hC35eA++gc9dvO28/lcEQ=; b=ZHyHgbYiTnJEFfmq9mXDJcENYpZarrKUWMMDJb6w1mC3wcos1K8yIk3M4gZGlK4LdN7HfQ9Gqpen7rS3Cb1fV9/fZYz9Lu05DBSAsrA2rwZN0xGugK8yilQvr7cxRVXckVPIR1C6mq4C5mo2RDJNw/+9qYjUgq6rGSfI4QzSMKo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756725935713468.4616738195616; Mon, 1 Sep 2025 04:25:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ut2eW-0000NI-Px; Mon, 01 Sep 2025 07:24:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eJ-0000HK-4C for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eH-00068i-5c for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:34 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-92-_1Nn2LaKPp-o9bk55BypUQ-1; Mon, 01 Sep 2025 07:24:28 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9157E195608F; Mon, 1 Sep 2025 11:24:27 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.44.32.80]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EECA0180029C; Mon, 1 Sep 2025 11:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756725872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RusSw3DLmNp2e2rRKWn+E9hC35eA++gc9dvO28/lcEQ=; b=ZEPUCtOlDpwLxwMSqCJx9PipDzj19ovQf92Etg08oHbIH+yNtSmpNuVJBGLNOyurZEqFUQ lISVWHp8c/wIzA0vMErJ9OxsXKOUuD18hHNVzWAyB4s1fF9QKv5JT9G4nlIIKvEsphCzPu DWy3lsSScE2qtBNKWrpmLwBsB13FDUs= X-MC-Unique: _1Nn2LaKPp-o9bk55BypUQ-1 X-Mimecast-MFC-AGG-ID: _1Nn2LaKPp-o9bk55BypUQ_1756725867 From: Kostiantyn Kostiuk To: qemu-devel@nongnu.org, Peter Maydell , Stefan Hajnoczi , Richard Henderson Subject: [PULL v2 4/9] qga-vss: Remove unused dependencies Date: Mon, 1 Sep 2025 14:24:08 +0300 Message-ID: <20250901112413.114314-5-kkostiuk@redhat.com> In-Reply-To: <20250901112413.114314-1-kkostiuk@redhat.com> References: <20250901112413.114314-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1756725937731124100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Yan Vugenfirer Link: https://lore.kernel.org/qemu-devel/20250825145241.170717-3-kkostiuk@r= edhat.com Signed-off-by: Kostiantyn Kostiuk --- qga/vss-win32/meson.build | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index 0ac918910b..a6b810f12a 100644 --- a/qga/vss-win32/meson.build +++ b/qga/vss-win32/meson.build @@ -13,13 +13,11 @@ qga_vss =3D shared_module( link_args: link_args, vs_module_defs: 'qga-vss.def', dependencies: [ - glib, socket, cc.find_library('ole32'), cc.find_library('oleaut32'), cc.find_library('shlwapi'), - cc.find_library('uuid'), - cc.find_library('intl') + cc.find_library('uuid') ] ) =20 --=20 2.50.1 From nobody Sun Sep 28 15:28:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756725987; cv=none; d=zohomail.com; s=zohoarc; b=Z9z9UTDP/+7O75nbyqWryaPNl3u1uBKlUwl5UfrsTOaPltxYN2I+RuC+Tti4z4IrBWHopxmGlcVqRgcC8/kYKVFt5JZh0N0tkT8FBHYEKEwjlWzxfrK43S70n8bD2HTglfbFx11saFPCqYtt1zkVrbjwfVfolyi41q4aALxp9Rc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756725987; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=TDTBE92ZFAr7EyIfri2Q8TbKCHTFGHvD8rELbKaLqTg=; b=e1I3wepXXrJI07g8qbYTwKlr/C3mjOJEbLfYsASS18q+5Af26PyrNKKsj16pu1l2JerpHzw9HhycTdtjkjTMIS97uqXp+2mOIHYvMYyPHJ+28/q/ngjgR5xUHmXtvXCIbJ73ZKp3JPmOkc/aXhHtQAbSQvHe9UduBMU6IPGe+f0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756725987047770.097394051398; Mon, 1 Sep 2025 04:26:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ut2eX-0000Nq-Rl; Mon, 01 Sep 2025 07:24:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eN-0000IZ-IZ for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eL-0006CR-Lb for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:39 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-196-o8KXFPpkMXyQqFpzHQA6fg-1; Mon, 01 Sep 2025 07:24:30 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B049A180034A; Mon, 1 Sep 2025 11:24:29 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.44.32.80]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1AA7A1800446; Mon, 1 Sep 2025 11:24:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756725876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TDTBE92ZFAr7EyIfri2Q8TbKCHTFGHvD8rELbKaLqTg=; b=BXTjOWfb6Plwar6a743BK2ejZT9s34FtI8vd/RtEx1rfiwV+cPh5U2ikt/lwkf5QpjovXH JrMP/YPO5FxSCi4zyBfq+TjV2INspElG5dqW6cLaKKMFOOKIzwVYkrCOcM2DtsSXD5Xs09 qPN56Yo9MpDsBV8LVnCn72HqEcmqxy0= X-MC-Unique: o8KXFPpkMXyQqFpzHQA6fg-1 X-Mimecast-MFC-AGG-ID: o8KXFPpkMXyQqFpzHQA6fg_1756725869 From: Kostiantyn Kostiuk To: qemu-devel@nongnu.org, Peter Maydell , Stefan Hajnoczi , Richard Henderson Subject: [PULL v2 5/9] qga: Fix channel initialization check in run_agent_once Date: Mon, 1 Sep 2025 14:24:09 +0300 Message-ID: <20250901112413.114314-6-kkostiuk@redhat.com> In-Reply-To: <20250901112413.114314-1-kkostiuk@redhat.com> References: <20250901112413.114314-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1756725988168124100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Yan Vugenfirer Reviewed-by: Michal Privoznik Link: https://lore.kernel.org/qemu-devel/20250825140549.146617-2-kkostiuk@r= edhat.com Signed-off-by: Kostiantyn Kostiuk --- qga/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index 6c02f3ec38..a1bf8f53ac 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1563,7 +1563,7 @@ static void cleanup_agent(GAState *s) static int run_agent_once(GAState *s) { if (!s->channel && - channel_init(s, s->config->method, s->config->channel_path, + !channel_init(s, s->config->method, s->config->channel_path, s->socket_activation ? FIRST_SOCKET_ACTIVATION_FD : -= 1)) { g_critical("failed to initialize guest agent channel"); return EXIT_FAILURE; --=20 2.50.1 From nobody Sun Sep 28 15:28:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756725958; cv=none; d=zohomail.com; s=zohoarc; b=BM5RBz363FAB7G84c3PTBW0hfcXiWiI9z2rELGKQlNj/TxVJQgoWsdyFlScQPdKkGIO3HvLPYws75W0pPQztFIYhYJmFjvpYp4Tcqj2474FgJ9x/iwgjemiXiOw0WcR+gPY7YAh+bbtBZyI4OQwHPDPXlS1y/s6fBi9kJfOBZPo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756725958; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=PGvG/LGRqC2htS89N6HiSrot7Fa5WLiu5iEYx6qvNzE=; b=bKJu0IEppuqyjh2iwh+6qyLAIJO5RIqb0yELyjrVN0UtZgK3xSwrfSbb5p0Zmkq5w5EMvEmI0w1dEbW+2NoN9l456jtLDNZVqYsGqxAOPYNxAHc3qjC6e1bJhYchnxcoePrfLafDitWRC7K23m1RnqaiYcUfNxPy2dZzKZgoQyk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756725958128899.9445542235521; Mon, 1 Sep 2025 04:25:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ut2eW-0000MK-F9; Mon, 01 Sep 2025 07:24:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eP-0000Iw-Al for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eJ-0006Ai-Ah for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:41 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-18-dHT-a_PYMUOrMPT_th2QTA-1; Mon, 01 Sep 2025 07:24:33 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0A022195C27B; Mon, 1 Sep 2025 11:24:32 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.44.32.80]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 670221800446; Mon, 1 Sep 2025 11:24:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756725874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PGvG/LGRqC2htS89N6HiSrot7Fa5WLiu5iEYx6qvNzE=; b=SH/1Va9/F0hyllZBirWF77TgTuGogyq106i0a5CYjzvSBRCafs9QADD0t24eKjLKPxwgYn GkhmEfUdhjOUL2IuhGwyXCRDZJeQ/T7DSV6AmeDoeuNy7z3jUjtEO8M5moG1TTESHnnzrB QX21LK9cgnopk7sRYo49YkoKCDXp4L4= X-MC-Unique: dHT-a_PYMUOrMPT_th2QTA-1 X-Mimecast-MFC-AGG-ID: dHT-a_PYMUOrMPT_th2QTA_1756725872 From: Kostiantyn Kostiuk To: qemu-devel@nongnu.org, Peter Maydell , Stefan Hajnoczi , Richard Henderson Subject: [PULL v2 6/9] qga: ignore channel_init() fail if 'retry_path' is set Date: Mon, 1 Sep 2025 14:24:10 +0300 Message-ID: <20250901112413.114314-7-kkostiuk@redhat.com> In-Reply-To: <20250901112413.114314-1-kkostiuk@redhat.com> References: <20250901112413.114314-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1756725959842124100 Content-Type: text/plain; charset="utf-8" On Windows, we run QGA with `-d --retry-path` options by default, and expect that QGA will start even without the vioserial driver and will wait for communication forever. Reviewed-by: Yan Vugenfirer Reviewed-by: Michal Privoznik Link: https://lore.kernel.org/qemu-devel/20250825140549.146617-3-kkostiuk@r= edhat.com Signed-off-by: Kostiantyn Kostiuk --- qga/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qga/main.c b/qga/main.c index a1bf8f53ac..dd1c216f9a 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1512,8 +1512,12 @@ static GAState *initialize_agent(GAConfig *config, i= nt socket_activation) =20 if (!channel_init(s, s->config->method, s->config->channel_path, s->socket_activation ? FIRST_SOCKET_ACTIVATION_FD : = -1)) { - g_critical("failed to initialize guest agent channel"); - return NULL; + if (s->config->retry_path) { + g_info("failed to initialize guest agent channel, will retry"); + } else { + g_critical("failed to initialize guest agent channel"); + return NULL; + } } =20 if (config->daemonize) { --=20 2.50.1 From nobody Sun Sep 28 15:28:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756725946; cv=none; d=zohomail.com; s=zohoarc; b=aXmq3DERSNVtb+oN0ybigdg4JEC5z6HTG0ryPHiPeDRNI97LkRMjSv52E9lr8w/Z/Sod2SB8ngLPbx/cBw2uK+/hPRpSsoYTWsdoAN1mDkvgmPGuTLD3yZ1Jr6+JSjxEIb5WvAtzGomv3lrrArbWHKcAL6D690nFO2yaSxX9FNw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756725946; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=JKbrB0s6B1hxtiguHSN3mL4QozFKLp4LyEThmokh9/o=; b=FAEDuym2Wz/FcJYl7a7t/OSGQmM1ARo1Vjq4dRC+p8xVjmWJLitPdgCDXnMdEv4vjRMwzXLcGT3/K1aLqS2lDrv09sO/GLyoqUBcdxfDeT6bTwemX/pDuh8EUlxDt+r/oZfMctcZDU+fFeduJ1Rf/chQQojfjQ4OU6c0NkRDY6Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756725946494705.4160504413367; Mon, 1 Sep 2025 04:25:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ut2eZ-0000Om-SL; Mon, 01 Sep 2025 07:24:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eR-0000JJ-3G for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eP-0006Cz-40 for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:42 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-226-14bvx3jKObWLuH2DO3mx2A-1; Mon, 01 Sep 2025 07:24:35 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 656141800289; Mon, 1 Sep 2025 11:24:34 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.44.32.80]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8750B1800294; Mon, 1 Sep 2025 11:24:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756725879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JKbrB0s6B1hxtiguHSN3mL4QozFKLp4LyEThmokh9/o=; b=H3kzfdmp8avHViZYn4HYkkgCD5aAei0Oi1bufD8INLtvSVJGweHDdwwUSUxk5323zoB+jH FkyXw55woy3+BMolDBDUeVlBnT0WpN5FRsfMHrd3YGgNLE4PjKrkMtzUP2QZQ6xTjATHO8 4g7LCoD01KcUIQOnbJtbrq9fwNCN8B4= X-MC-Unique: 14bvx3jKObWLuH2DO3mx2A-1 X-Mimecast-MFC-AGG-ID: 14bvx3jKObWLuH2DO3mx2A_1756725874 From: Kostiantyn Kostiuk To: qemu-devel@nongnu.org, Peter Maydell , Stefan Hajnoczi , Richard Henderson Subject: [PULL v2 7/9] qga-vss: Write hex value of error in log Date: Mon, 1 Sep 2025 14:24:11 +0300 Message-ID: <20250901112413.114314-8-kkostiuk@redhat.com> In-Reply-To: <20250901112413.114314-1-kkostiuk@redhat.com> References: <20250901112413.114314-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1756725947677116600 Content-Type: text/plain; charset="utf-8" QGA-VSS writes error using error_setg_win32_internal, which call g_win32_error_message. g_win32_error_message - translate a Win32 error code (as returned by GetLastError()) into the corresponding message. In the same time, we call error_setg_win32_internal with error codes from different Windows componets like VSS or Performance monitor that provides different codes and can't be converted with g_win32_error_message. In this case, the empty suffix will be returned so error will be masked. This commit directly add hex value of error code. Reproduce: - Run QGA command: {"execute": "guest-fsfreeze-freeze-list", "arguments": = {"mountpoints": ["D:"]}} QGA error example: - before changes: {"error": {"class": "GenericError", "desc": "failed to add D: to snapshot= set: "}} - after changes: {"error": {"class": "GenericError", "desc": "failed to add D: to snapshot= set: Windows error 0x8004230e: "}} Reviewed-by: Yan Vugenfirer Link: https://lore.kernel.org/qemu-devel/20250825135311.138330-1-kkostiuk@r= edhat.com Signed-off-by: Kostiantyn Kostiuk --- qga/vss-win32/requester.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp index bc260abb96..5615955b6f 100644 --- a/qga/vss-win32/requester.cpp +++ b/qga/vss-win32/requester.cpp @@ -28,8 +28,9 @@ =20 #define err_set(e, err, fmt, ...) { = \ (e)->error_setg_win32_wrapper((e)->errp, __FILE__, __LINE__, __func__,= \ - err, fmt, ## __VA_ARGS__); = \ - qga_debug(fmt, ## __VA_ARGS__); = \ + err, fmt ": Windows error 0x%lx", = \ + ## __VA_ARGS__, err); = \ + qga_debug(fmt ": Windows error 0x%lx", ## __VA_ARGS__, err); = \ } /* Bad idea, works only when (e)->errp !=3D NULL: */ #define err_is_set(e) ((e)->errp && *(e)->errp) --=20 2.50.1 From nobody Sun Sep 28 15:28:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756725967; cv=none; d=zohomail.com; s=zohoarc; b=JyszvS5+upieZ/dVxdezjkbu4PggrzcitgaA8eX3+yM6uRkCSieBTa1C/XKMW4/A0ODwi4mNqfZn/CS3bBvR0tIFsWV+euJwZrkToWz5y4IL02zzHzXq1iJsyf1X/AhfA1zveIbmPoQ0/L439bnDGZpyV+l5fWOVEp13IWJbbXw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756725967; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=8c1ZCXtMUdtENwpBFT4KuDVIvDg1G6MIjUiO8Sv6SJk=; b=Qr/1wahhgVcRvayuuGFeubqdIPyoLhgXJNO15rX2iwGlMSvaS2zH1SxMyaW4ul6vXZGpu+eVBmEB6dErf5MSOxz1ozw9lR0hxewHiYWPHghm64XAZzbzng0pw3zreQCkgw4fG+ICYCcprC6a1tubyB2yXSmyFvknXNU18u9Seac= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756725967409619.3809091053098; Mon, 1 Sep 2025 04:26:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ut2eX-0000Nd-9Y; Mon, 01 Sep 2025 07:24:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eS-0000K4-OZ for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eN-0006Ck-H9 for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:44 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-348-U6R_kVJnO2OSAGkyWAVS-g-1; Mon, 01 Sep 2025 07:24:37 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 890191956089; Mon, 1 Sep 2025 11:24:36 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.44.32.80]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E5BDD1800446; Mon, 1 Sep 2025 11:24:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756725878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8c1ZCXtMUdtENwpBFT4KuDVIvDg1G6MIjUiO8Sv6SJk=; b=JjByXldemroGGw8fmt0CQ3WAiwuD/SZLjFKCSOwvswJOhNq9f/4ArP3TuwPc673fpQkZ0H LIYS2Dkcwu1pbZT3l0kpNofbWAujOPhhHrZabMUmSBWoGwgO3v6Ga4S1vYjmRff6LTfKh/ NF1WjLg2Uztrm0gAlvjddaQGWpXaP7E= X-MC-Unique: U6R_kVJnO2OSAGkyWAVS-g-1 X-Mimecast-MFC-AGG-ID: U6R_kVJnO2OSAGkyWAVS-g_1756725876 From: Kostiantyn Kostiuk To: qemu-devel@nongnu.org, Peter Maydell , Stefan Hajnoczi , Richard Henderson Subject: [PULL v2 8/9] qga/installer: Remove QGA VSS if QGA installation failed Date: Mon, 1 Sep 2025 14:24:12 +0300 Message-ID: <20250901112413.114314-9-kkostiuk@redhat.com> In-Reply-To: <20250901112413.114314-1-kkostiuk@redhat.com> References: <20250901112413.114314-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1756725970001124100 Content-Type: text/plain; charset="utf-8" When QGA Installer failed to install QGA service but install QGA VSS provider, provider should be removed before installer exits. Otherwise QGA VSS will has broken infomation and prevent QGA installation in next run. Reviewed-by: Yan Vugenfirer Link: https://lore.kernel.org/qemu-devel/20250825143155.160913-1-kkostiuk@r= edhat.com Signed-off-by: Kostiantyn Kostiuk --- qga/installer/qemu-ga.wxs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs index df572adb4a..32b8308728 100644 --- a/qga/installer/qemu-ga.wxs +++ b/qga/installer/qemu-ga.wxs @@ -151,6 +151,14 @@ Return=3D"check" > + + =20 @@ -174,8 +182,19 @@ =20 - Installed - NOT REMOVE<= /Custom> + + + + + + + NOT RE= MOVE + + + NOT REMOVE + + + Installed --=20 2.50.1 From nobody Sun Sep 28 15:28:22 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756725962; cv=none; d=zohomail.com; s=zohoarc; b=CWJqwZ8anlS/inP6pWye0NOHAMeMpucFNQl71Jxe0f054haKoPsNEF7C/n+mXm/ntRjKWThahLG/1RbPvSBOjj2gSyYQt/j34VvAUIj0VmoDBqMr84UEESUbmTL/mDbiBKPvl1kDh1m4Dnoa+guSIHerw16WARyYR5HqgxgwumA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756725962; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=8imASNa7WPLoyL5in5AEAUw1DAQ60jo9idLSR9tKcfs=; b=HUBHuV0LEHdOFEqlMP2haKczvYgEsX165oDTIPCGsTiLsjYkVD5VxvziXs23Mpb/K1w75BK03HgBWNVPyZufHloG8r4qt1uedhnoO1GF4mbdxJtwrtSxBYQabCV7odqHlQeOmjqudDGXzC+aWD735WtjM3M7OQpqpomQgH7TZEE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756725962600267.2950881326009; Mon, 1 Sep 2025 04:26:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ut2eZ-0000OY-Pc; Mon, 01 Sep 2025 07:24:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eT-0000KQ-DT for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ut2eR-0006DN-Hy for qemu-devel@nongnu.org; Mon, 01 Sep 2025 07:24:45 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-662-40n7um84Msa2QJEOc4InkA-1; Mon, 01 Sep 2025 07:24:39 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AA971195C27B; Mon, 1 Sep 2025 11:24:38 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.44.32.80]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 127EB1800446; Mon, 1 Sep 2025 11:24:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756725882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8imASNa7WPLoyL5in5AEAUw1DAQ60jo9idLSR9tKcfs=; b=W4Z1b8lLHpMo/EAB0egMjczel+kMwUwqm7DsLmIk2avo0nU/M0YjLFAM895DJNq8hOTAWl QU7bdZtgfSNFvYsbaPPHANjnpHQde5jqmLjlLDlulxInDK8gjBHqzHTgtSvLWGGYv22e4P nHLObomyWL3ViGpKN06xlfg89cwVQe0= X-MC-Unique: 40n7um84Msa2QJEOc4InkA-1 X-Mimecast-MFC-AGG-ID: 40n7um84Msa2QJEOc4InkA_1756725878 From: Kostiantyn Kostiuk To: qemu-devel@nongnu.org, Peter Maydell , Stefan Hajnoczi , Richard Henderson Subject: [PULL v2 9/9] qga: Fix truncated output handling in guest-exec status reporting Date: Mon, 1 Sep 2025 14:24:13 +0300 Message-ID: <20250901112413.114314-10-kkostiuk@redhat.com> In-Reply-To: <20250901112413.114314-1-kkostiuk@redhat.com> References: <20250901112413.114314-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1756725963788116600 From: "minglei.liu" Signed-off-by: minglei.liu Fixes: a1853dca743 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Kostiantyn Kostiuk Link: https://lore.kernel.org/qemu-devel/20250711021714.91258-1-minglei.liu= @smartx.com Signed-off-by: Kostiantyn Kostiuk --- qga/commands.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qga/commands.c b/qga/commands.c index 5a5fad31f8..5f20af25d3 100644 --- a/qga/commands.c +++ b/qga/commands.c @@ -205,13 +205,15 @@ GuestExecStatus *qmp_guest_exec_status(int64_t pid, E= rror **errp) #endif if (gei->out.length > 0) { ges->out_data =3D g_base64_encode(gei->out.data, gei->out.leng= th); - ges->has_out_truncated =3D gei->out.truncated; + ges->has_out_truncated =3D true; + ges->out_truncated =3D gei->out.truncated; } g_free(gei->out.data); =20 if (gei->err.length > 0) { ges->err_data =3D g_base64_encode(gei->err.data, gei->err.leng= th); - ges->has_err_truncated =3D gei->err.truncated; + ges->has_err_truncated =3D true; + ges->err_truncated =3D gei->err.truncated; } g_free(gei->err.data); =20 --=20 2.50.1