From nobody Fri Oct 23 21:31:52 2026 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=1792669681; cv=none; d=zohomail.com; s=zohoarc; b=F7RCurcvuTsyTXM6XkZQaG5dfN0fKG47GErqYOoiGTw5VhoydIvGqrMBfAD8osyQ3I8RIxIAY/bYmiE6fKCS7lHswjtSwZQb2Q3kqFUEKS95xf8d0ILYf0najC7vfSIamgqDu7WNBh7pTnqtX8TIGLW1ZanOi8WacGU6KMWbHWc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792669681; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nCEVMD1gyJAzZ9YtCPiB1iMbNGx4Ji4Gb/+PW9esD/Q=; b=NBXFl9TT8L2vv05vc1KgEZ+9ptCW64E4B1m4q3Ooej9QTcn8OK4fs7Ek8p27d8aV8+7CIP+vu8xpnmKfKfe2hVj5krlsm4qfbySyRHREAgecysaLUIkUfwZf+ZjMpa5AZ9Y4+tGjcWCtvAvsQ8O/0F8RRfGmyjbfhS6ZMCH6cI0= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792669681474644.3452877221168; Thu, 22 Oct 2026 04:48:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJrGp-0006eZ-Sp; Thu, 22 Oct 2026 07:47:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJrGo-0006e3-6P for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:47:42 -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 1xJrGm-0007Bh-I6 for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:47:41 -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-586-u_s2ADT7PQ6OkvL4i76C3g-1; Thu, 22 Oct 2026 11:47:36 +0000 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 3214C1955F07; Thu, 22 Oct 2026 11:47:34 +0000 (UTC) Received: from localhost (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C3F351800642; Thu, 22 Oct 2026 11:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792669658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nCEVMD1gyJAzZ9YtCPiB1iMbNGx4Ji4Gb/+PW9esD/Q=; b=UtCxuO3vR4XcQk69q3azpFRzUC8k8H3tqk5s7x8cVIU/AeYI6zz83DL773eXwOkPeGRfuo nTyfj+uhd7xUafbDtS3m0UIPzzyPdSnql2HPcCciPWO+NRyCm2Y6LPuhg2KgsgOMljTLrb pH0hgOqXvyy4XM2d5GQx/RkJLuNjKyA= X-MC-Unique: u_s2ADT7PQ6OkvL4i76C3g-1 X-Mimecast-MFC-AGG-ID: u_s2ADT7PQ6OkvL4i76C3g_1792669654 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Thu, 22 Oct 2026 15:47:14 +0400 Subject: [PATCH v3 01/10] tests/launchupdate-test: correct g_auto usage MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261022-nohmp-next-v3-1-8b581b590512@redhat.com> References: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> In-Reply-To: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> To: qemu-devel@nongnu.org Cc: Ani Sinha , Gerd Hoffman , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , Stefano Garzarella , Jared Rossi , Zhuoying Cai , Christian Borntraeger , Jason Herne , Halil Pasic , Eric Farman , Matthew Rosato , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Peter Maydell X-Developer-Signature: v=1; a=openpgp-sha256; l=1214; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=B4SuUYDYOYHdj6YNYX9ybX09sSVtBdqWgwmLhNkBr3c=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBq2ffNmnHI++W3hjXq6LHUEnmdYKKmPtVEAb6zN vdhWIsBP3WJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCatn3zQAKCRDa6OEJdZac 5QcYD/9hh6ly900E2Z1CwxUifDDzmfC1fZI1EQJBRVonyeomZm0697iwQVyj6sIL6Y//xYIsNZ4 annXGjFxAdfDvnVaX9b3R1c3dmwOMelXiwiQSmprx5cnqpKri1z4J+08yVSnlGxIgbnGVplqkts u76Wk5rRswnAjG2syh0pnDFGgWdUoDp6GGw3rkgXkpck3juz9fAM59Qs9sWfG1a4YK5Tv8meKB6 eOp1tyDKpOIGjiXKlTRVVOTmoLg7KH9+4iM8NjCNWBR3jHKNtlUN2in3fiELhF1XAaQjBivPXq7 KPyOI7Xk7Z+hYaXC7hyeBZSPJdD+tpG/Tn0zvRWhGqLm9nL0PWE9JiyNYNmXryjSgqwlaX7EdJX 7s924XIcu3+8g+j2a8K7q5T11WDxHwP5WJJ4Cm/dtGSA9PkIP5o4NumXmoRS/Fbigxua37Jl7+q 9JtJW0nQdbzuuFnYHiNsg03kh7t2qV2k1QzL7R3dmipeYl7BTWPUH+6BWCgmwHl54prI//QuG4L P3rGvHH0chuQr/C55RbGY2wRBw7FMI+LsWS2W1dzjeWLa4QbcRDwmeA52iuxqegnHyQIyG6iOTl OuJlHTZDP41HM7XmVzpPf3FYx/FH003s3NiedSjdsVGzcTBztSc+7f0kSNSvAl/nkTTOkvZAME6 xExIBmI8F7kODfw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1792669683530158500 g_free() isn't the appropriate way to release those types. Fixes: 0b70c6ce7b31 ("Add functional and unit tests for the vm-launch-updat= e device") Reviewed-by: Peter Maydell Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/qtest/launchupdate-test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/qtest/launchupdate-test.c b/tests/qtest/launchupdate-tes= t.c index 225c843df5b9..ed007cdce29f 100644 --- a/tests/qtest/launchupdate-test.c +++ b/tests/qtest/launchupdate-test.c @@ -192,8 +192,8 @@ static guint32 match_string(char *serial_f, const char = *exp_out) { GError *error =3D NULL; g_autofree gchar *f_contents =3D NULL; - g_autofree GRegex *regex =3D NULL; - g_autofree GMatchInfo *match_info =3D NULL; + g_autoptr(GRegex) regex =3D NULL; + g_autoptr(GMatchInfo) match_info =3D NULL; gsize len; guint32 count =3D 0; gboolean ret; @@ -214,7 +214,6 @@ static guint32 match_string(char *serial_f, const char = *exp_out) g_match_info_next(match_info, &error); count++; } - g_regex_unref(regex); return count; } =20 --=20 2.56.0.116.g6de20f6092dc From nobody Fri Oct 23 21:31:52 2026 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=1792669756; cv=none; d=zohomail.com; s=zohoarc; b=HMimBZN14DZDm+8aR9p6crqxP1VgJ5cEi/4HOb/f1pnnzlyhSWMHZEFR9RyTw4L98XHEah3aMJHk4qOFwzTs2NZBxcvyIuDEZ0kYiQusNs4EhUKdH238ZCci5WzxKeMhERyZQQptCvCy2PXn295rpHCRQ6s5ERwXsjk/r7T6zSM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792669756; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=unQXSTQTZoQiah9mbg1f2OYCq0ukmOFPU3aCLL6PWvQ=; b=PfNpVuVrDkLryFxfTnwrmu+/STMrvXSysq7XCW+/71BsIUvv5B1Tm+uCANmG8VeTtzxwUrPoMTucCkQYLd4QlXStf+9idmLfbShggzkU5L+NrF/DxfHTDtEMtiWO0kwYyhYl/837il3QyiBUeT++WSuEtRIz6Zm7AkVKzAJviUg= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792669756668316.58691844654993; Thu, 22 Oct 2026 04:49:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJrGs-0006ft-GJ; Thu, 22 Oct 2026 07:47:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJrGq-0006el-EC for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:47:44 -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 1xJrGo-0007C8-Qs for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:47:44 -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-281-924toFSGNaGXadNsJ7lNOg-1; Thu, 22 Oct 2026 11:47:40 +0000 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 E09E518011DE; Thu, 22 Oct 2026 11:47:37 +0000 (UTC) Received: from localhost (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D22AD1800642; Thu, 22 Oct 2026 11:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792669661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=unQXSTQTZoQiah9mbg1f2OYCq0ukmOFPU3aCLL6PWvQ=; b=KgYjG+AhYWcpvNFjBJhQBglkFFfXFuXQ8duivCxIM9O377jyEuel2fF3PeOQzIL5TqUY83 /9Easi+mg+ioPVxyGzBvjV3F9H+sag8yYyrD+i8POhnxpw9Va5Ry5A/6vkX81QVEwwWTaQ BNBmYfv1Wi6Hhc5bD8qMOZvaGoRuatM= X-MC-Unique: 924toFSGNaGXadNsJ7lNOg-1 X-Mimecast-MFC-AGG-ID: 924toFSGNaGXadNsJ7lNOg_1792669658 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Thu, 22 Oct 2026 15:47:15 +0400 Subject: [PATCH v3 02/10] tests/launchupdate-test: correctly release qs MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261022-nohmp-next-v3-2-8b581b590512@redhat.com> References: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> In-Reply-To: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> To: qemu-devel@nongnu.org Cc: Ani Sinha , Gerd Hoffman , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , Stefano Garzarella , Jared Rossi , Zhuoying Cai , Christian Borntraeger , Jason Herne , Halil Pasic , Eric Farman , Matthew Rosato , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Peter Maydell X-Developer-Signature: v=1; a=openpgp-sha256; l=2849; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=SIfxG9op7mrpLLVcQw4l/GNNVlnSFKeBptsXHMfpnlE=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBq2ffNT2E7uYx5WkzYIH8aCzY4N1jYpiiEHgYcA qAAgvO+nwmJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCatn3zQAKCRDa6OEJdZac 5er6EACrfimLDCz1+JmJMXF5rWkqxMphDRQkH1QSVRAW9POODONAkqjiKW5TUkcIPwF/BNTr+w3 J3D/1wf00dCQ5zO3z90DAxNAt41Ra8VPgzEwY/eLdIU8bbThi3L0KtvgQ4FfoURQdtw39cSiI34 RbXiS3Ao9dJr7gVITW/tFLf3g/iZ6vfbuyOtRtc4HW4JXJRq1MioI3zWu72uDNYBJ0Ziua+unCq EwoBJuKCB6wYJ8DyseLJb07SlYrIWlxCN7NUuCtfu0qvQ2nDkWhgoX16XyFVTjHyt2Eg2+3YX4g SA2mXQliyqfN89uSaCJy8oa3yDaFFV3a0sgBiqBEtxNCIRbztTZ3vBhJLVLLlt156Q6ptKdLYwo wnb6eLwFgWn5TbATB7vftLx53Wwk2ebPw+pCVagQyDBvwsyV4+Ei2jlAOUrxalh0ZwemFgdy6Sg YTC0k9WQN99DG/rgpR8xRP02PBDzT6DPierxOsK2FCT2QYJjhSbAGCm/YHSfy+qw05q96traM/a P7ffNF2HYJDM+FItua7ZTgaAJAkeIk4+o1fGwUS/31ifUJm8fXS4Cg11pprul3aXHDh0th4wZJp MKTtsLfHduCXY8UHzCvCDNqhN8eHS3DiDg4HPf478C7oO5IiOTa1AfpMe23IAUlEpbiMY87vdU/ m80Z9Rtdp63lzpA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: qemu development 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: 1792669758636158500 QOSState must be released with qtest_shutdown(). Fixes: 0b70c6ce7b31 ("Add functional and unit tests for the vm-launch-updat= e device") Reviewed-by: Peter Maydell Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/qtest/launchupdate-test.c | 13 ++++--------- tests/qtest/libqos/libqos.h | 2 ++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/qtest/launchupdate-test.c b/tests/qtest/launchupdate-tes= t.c index ed007cdce29f..ea35da81feb9 100644 --- a/tests/qtest/launchupdate-test.c +++ b/tests/qtest/launchupdate-test.c @@ -51,7 +51,7 @@ static void test_vm_launch_update_capability(void) static void test_vm_launch_update_disable(void) { QFWCFG *fw_cfg; - QOSState *qs; + g_autoptr(QOSState) qs =3D NULL; VMLaunchUpdate launch_update; uint64_t control; size_t filesize; @@ -95,13 +95,12 @@ static void test_vm_launch_update_disable(void) g_assert_cmpint(VM_LAUNCHUPDATE_CTL_DISABLE & control, =3D=3D, 1); =20 pc_fw_cfg_uninit(fw_cfg); - qtest_shutdown(qs); } =20 static void check_error(void) { QFWCFG *fw_cfg; - QOSState *qs; + g_autoptr(QOSState) qs =3D NULL; VMLaunchUpdate launch_update; uint16_t status; size_t filesize; @@ -326,7 +325,7 @@ static void test_load_igvm(void) size_t igvm_sz; size_t filesize; QFWCFG *fw_cfg; - QOSState *qs; + g_autoptr(QOSState) qs =3D NULL; VMLaunchUpdate launch_update; =20 if (!trace) { @@ -456,8 +455,6 @@ static void test_load_igvm(void) close(ser_fd); guest_free(&qs->alloc, gaddr); pc_fw_cfg_uninit(fw_cfg); - /* qtest_quit() kils QEMU, first by sending SIGTERM, then SIGKILL */ - qtest_quit(qs->qts); } =20 static void test_set_ctrl_once_and_reset_to_host_igvm(void) @@ -475,7 +472,7 @@ static void test_set_ctrl_once_and_reset_to_host_igvm(v= oid) size_t igvm_sz; size_t filesize; QFWCFG *fw_cfg; - QOSState *qs; + g_autoptr(QOSState) qs =3D NULL; VMLaunchUpdate launch_update; =20 if (!qtest_has_machine("q35")) { @@ -585,8 +582,6 @@ static void test_set_ctrl_once_and_reset_to_host_igvm(v= oid) close(ser_fd); guest_free(&qs->alloc, gaddr); pc_fw_cfg_uninit(fw_cfg); - /* qtest_quit() kils QEMU, first by sending SIGTERM, then SIGKILL */ - qtest_quit(qs->qts); } =20 int main(int argc, char **argv) diff --git a/tests/qtest/libqos/libqos.h b/tests/qtest/libqos/libqos.h index c04950e2b19d..b2d02825a9af 100644 --- a/tests/qtest/libqos/libqos.h +++ b/tests/qtest/libqos/libqos.h @@ -42,4 +42,6 @@ static inline void qfree(QOSState *q, uint64_t addr) guest_free(&q->alloc, addr); } =20 +G_DEFINE_AUTOPTR_CLEANUP_FUNC(QOSState, qtest_shutdown) + #endif --=20 2.56.0.116.g6de20f6092dc From nobody Fri Oct 23 21:31:52 2026 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=1792669754; cv=none; d=zohomail.com; s=zohoarc; b=MtQvrOi2g/8H1XmOstuhoI0GyhxFEGigKjo1ts/+8aV0laeVBbfGWuKoUI0TSNuA4sUm4UoMC3mW8DHPUCbvFfwoEoOHip/FRiMvb3mD3w15EAgaPcoj7FRdDYsGYGQB6Kn7mQL37ViFHZFgdOed2FVq1toFQgYTAnql/wGVXyo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792669754; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DWiu4rdH5d4Ohomxfbbk+J9JlwPMqxTLl3rEhWFpI9s=; b=Fwk7ETue4lMNWRYD85dJedhiXQMhRWiOSVk368KdcygHF/35I4ueopL5Ddo6JEEyFQAHEq4DmHm/2FdvDTuqh+eJqH/ZFls6izVXgp+seHee3ORQG/toQpqR4zRta3H1nd+lraUDtzzCjZ51VHj3SfpMgbntuEZB8n68M2AefmU= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792669754558491.01921069434616; Thu, 22 Oct 2026 04:49:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJrHl-0006s0-VN; Thu, 22 Oct 2026 07:48:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJrGw-0006ic-BA for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:47:50 -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 1xJrGu-0007EK-PE for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:47:49 -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-13-5UXpuBwgMTC_FKtCo_NGyQ-1; Thu, 22 Oct 2026 07:47:43 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 4AAA4180065B; Thu, 22 Oct 2026 11:47:41 +0000 (UTC) Received: from localhost (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 26656195608B; Thu, 22 Oct 2026 11:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792669668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DWiu4rdH5d4Ohomxfbbk+J9JlwPMqxTLl3rEhWFpI9s=; b=S+l21ngZPVFJRg2ajZoa8Annb0gLpFAml4JH8cHvuA7b9Yndf/DakI7FFiwJxi650fDs3w /mAAb1a1EH9EhRd0GqqFH/DXSvdFEYGiHo84nLzLFvXrqzCA7IxCks8PIqXuGGOv6K0w1B or7cuOSxH5Ji/RkPcrCFmDMzMbcnKIU= X-MC-Unique: 5UXpuBwgMTC_FKtCo_NGyQ-1 X-Mimecast-MFC-AGG-ID: 5UXpuBwgMTC_FKtCo_NGyQ_1792669661 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Thu, 22 Oct 2026 15:47:16 +0400 Subject: [PATCH v3 03/10] tests/launchupdate-test: fix fw_cfg leak MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261022-nohmp-next-v3-3-8b581b590512@redhat.com> References: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> In-Reply-To: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> To: qemu-devel@nongnu.org Cc: Ani Sinha , Gerd Hoffman , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , Stefano Garzarella , Jared Rossi , Zhuoying Cai , Christian Borntraeger , Jason Herne , Halil Pasic , Eric Farman , Matthew Rosato , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Peter Maydell X-Developer-Signature: v=1; a=openpgp-sha256; l=761; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=X2HUHDf+UkIywAf5xGFW5GDIxuTg6SMnnUvGwLSGYRs=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBq2ffNkjDCvUSpO7HZPySdDTYOR1eBXBGxkcj8K 3wOyv6KwG+JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCatn3zQAKCRDa6OEJdZac 5S0WEACq2uNypNUDcmxPi/G3oPTXDIO6LSJD1PqzjzNIBaNRwJWyp6SIzwTIvX46RauSJnG2UzU hZuskoE/QMiaKSIqxxdXRbaCgdRJUrJsxzZkXEF3Hqz+m7fvaa/8jDncEzeaVHzajjKf0vxPakT HsanOZV4uRruoeAITvksP4jufzsVdSqhTja0UGxqCP1flz2Q5xWYMBOQf5MQvg0ywCLwlfmWafy XGY1KawCVgonpQjZ0V6rcB7lravXYzguwjIIAf3HcXXxTBHD+Gfo3nWbFt7Xkv6EgqEYKKkKUol A7nw4Yqr8T2nbhqBEU7WGzOyeSc/KiIOSvb1o0lFWLnKNQaQgZWK80qaxq87V4PVpSAaWEgtRy7 Hv5f9pgwXr6lDqptfpwmFw49MJor/H1YESIPRgR8LkvhCcvaDu7rEV1WpNTKFL3M05u5RE7rsAF yRHri7lsW5ccah2faVpg/2SoNKq3ict/pg8zpsjFGZSKnLMXdHIgLRE8ApLxOr1aqH1z+ld9ABD NSYyENAZ9TJ47CdAmHpczOqGu2flv7/7bPMPK+e4woG2tgTO/badMfKFY8f1OvhkcnUevz28SL+ d46MRb8KnTeJJE1q0m7rUg0x8PEzqyEirSRNDFOOrogyYw7V/PQOuRtoPCBBipP4JPMxM1vzBgZ juQJ5dydQpdsXzg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: qemu development 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: 1792669756682158500 Reviewed-by: Peter Maydell Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/qtest/launchupdate-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/launchupdate-test.c b/tests/qtest/launchupdate-tes= t.c index ea35da81feb9..beec902caa6a 100644 --- a/tests/qtest/launchupdate-test.c +++ b/tests/qtest/launchupdate-test.c @@ -148,6 +148,8 @@ static void check_error(void) status =3D le64_to_cpu(launch_update.status); /* should fail with LOAD_FAIL since it was not IGVM format */ g_assert_cmpint(status, =3D=3D, VM_LAUNCHUPDATE_LOAD_FAIL); + + pc_fw_cfg_uninit(fw_cfg); } =20 static int64_t get_image_size(const char *filename) --=20 2.56.0.116.g6de20f6092dc From nobody Fri Oct 23 21:31:52 2026 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=1792669822; cv=none; d=zohomail.com; s=zohoarc; b=kgtjKpayWHy8zU2Qbi/OpJRaDicRtt9YqmLZupSZ9OUMYRyVYthnyW+1A7KpH+7/4Zd4n8Wq2XBnT8Z20lz9mwcHggnBvuGwGSbYNPk1Q+Uqh4uDcDWvoro1z/hCRabhDZzX6I2Ok+cz5YYl0+6KAffxOL9mbkeavvqMW22LKMw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792669822; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2DO8OeMb+C+EUDoAt5gPWzSeCXRyILLDCf3aXuMCRFo=; b=NIOVuFVwGZyijDdA89DBDdP5an1fJk0b99OEi9z1HZIUJ/2HN2N6yaSys5Ckw4r2Ka/aeDacaPsWICJiRYmiq58LggO6NH4KcNF098vLrM48JDn+Of8jSV+bXm6qdqLo/XwZipn4TaqCqwppmr/rfi48hm5yipXHpVb4G8VS0x8= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792669822091900.8961678704924; Thu, 22 Oct 2026 04:50:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJrIW-0007Ww-JD; Thu, 22 Oct 2026 07:49:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJrGz-0006jH-Sr for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:47:54 -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 1xJrGx-0007Eo-6e for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:47:53 -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-28-EhNRYIhAOrO-ylTcYOmRGw-1; Thu, 22 Oct 2026 07:47:47 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 C63401956056; Thu, 22 Oct 2026 11:47:44 +0000 (UTC) Received: from localhost (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EB9D918002B1; Thu, 22 Oct 2026 11:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792669670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2DO8OeMb+C+EUDoAt5gPWzSeCXRyILLDCf3aXuMCRFo=; b=ihc9Y1J2YHIZ5AZAbscqpaJJKNySmk3QZ7ukxvgOgEgDs0DMDwgCZ/v952uapNlxrJwvzA Qx2KBTKB+7YIEwM7rKLMGal1FZMnlYYO7F7tW9Aw6izrWB5qDCqzzU6pfESnUqBK2V7EeP HmkcF7BTT31TG4/uZ7MsPwCgf9wL53s= X-MC-Unique: EhNRYIhAOrO-ylTcYOmRGw-1 X-Mimecast-MFC-AGG-ID: EhNRYIhAOrO-ylTcYOmRGw_1792669664 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Thu, 22 Oct 2026 15:47:17 +0400 Subject: [PATCH v3 04/10] igvm: release found memory region on success MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261022-nohmp-next-v3-4-8b581b590512@redhat.com> References: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> In-Reply-To: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> To: qemu-devel@nongnu.org Cc: Ani Sinha , Gerd Hoffman , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , Stefano Garzarella , Jared Rossi , Zhuoying Cai , Christian Borntraeger , Jason Herne , Halil Pasic , Eric Farman , Matthew Rosato , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=821; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=wBMEnCG6NX/SrNvdiEREVxq3Y1p2VuUlUjKNL1jFJqw=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBq2ffN+9DaoIeVmXLAJhJvIfXxeAAXKucqrOiw4 TVWJOtP+GCJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCatn3zQAKCRDa6OEJdZac 5YFCD/96Ky+DPDGreowAlHMied1tiRZIdHRes2ESPbcQbmhFLGsHGuWDuKSfImzVxjrgnJCvKJd QIi4GuduiuWfwk5NyXB6Sd7vXNaE0Vpq535K5CT4uZ2EU1Z2LoRRzz0ltxM+DnPbcjG1IUVJ3jV If0Zp7xQGKqW4NXNX354QQ6IzMy5QVJMJ3rk3tYLX5cdgsFRuPrf5biJCSHvKZHtTBFPT7/gqeI BQBZVdE2FuKx8186unDr3uFRGvvg26kUnkevtOCQkUgoInQQzAPO7bPVWaVUqC9/CNdsRfueUMs g8bc5glbAZNDXLXQqN6S94LmfzRcdShXnV4b1NFo9GRGvLGtqSV9CXMqkrylirISeookFRPHuGj cjLSi5nk1k3PF9BPfmRiPV8QNJ4ePuyiai0LvFb9shRBVyAF48/80O0SGMpoqBd8VJRK12ld9dd MQkS7gOU+ohab6EtWphX3mHr5DeBbD6kC9CmPwVuA38keB2j1qQmu3GRYbSJekQjRcQgFgWk+Ph SSxLH59AWnhJ+bm0sdarnGOTwrpo5fvyb2dsrLvYbzh92mjuy438atka67wAHQBIl7IqC/u6OKI CJHEzKschdnfBQyX7P4oGFm2TO+eG+whraeg6DhaAzrs+4kJYasjzAadqDkaV5J4GSMsZL+vF0j zhIC84Op+AkIknQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1792669823858158500 Not only in error paths must the mrs.mr be released. Signed-off-by: Marc-Andr=C3=A9 Lureau --- backends/igvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/igvm.c b/backends/igvm.c index 58f3097e8518..7aa76441d0d0 100644 --- a/backends/igvm.c +++ b/backends/igvm.c @@ -268,9 +268,9 @@ static void *qigvm_prepare_memory(QIgvm *ctx, uint64_t = addr, uint64_t size, return NULL; } =20 + memory_region_unref(mrs.mr); gpa_region_size =3D int128_make64(size); if (int128_lt(mrs.size, gpa_region_size)) { - memory_region_unref(mrs.mr); error_setg( errp, "Processing of IGVM file failed: Could not prepare memory " --=20 2.56.0.116.g6de20f6092dc From nobody Fri Oct 23 21:31:52 2026 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=1792669759; cv=none; d=zohomail.com; s=zohoarc; b=Fz1KhJEGGjjwiSlPeAwx+tHsg+7MtROuKjjruCl/h/w1SvuoHjwVf8jx9szNwvSvoTpqFI7MaazOoYs60vvkAfcdhhZu7JWtfvJ5Dm5Saheey0O3lOqPB85B+WBTOygHIHXGUYMEdER+ZAn7OWsPCDkbiSd+NsOR4KqUoQEUDq8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792669759; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YoMIcrTq/DBPfeDgKUE341Lp+LFX1pQ4X5V2MP4UgNk=; b=VpjtQR0UAnWdf9ojguDvJ5FI0QyF8a5BoWmlGjqQienwx83N1KzgX2Nwq2XNn5dZDQ4H3/fOsPbdM0vh9ykreIz0yXqwA7DX3HtiOhE9hH7CMPtGh7YD/jQU/93/a7FEELTc+n92QyV14ZQoilqf8TxoFeuyMRQ+YOLHCk3T5OE= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792669759759455.81102068966106; Thu, 22 Oct 2026 04:49:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJrHw-0006xj-Rv; Thu, 22 Oct 2026 07:48:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJrH5-0006jv-8U for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:11 -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 1xJrH3-0007GA-LQ for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:47:58 -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-358-tXewS536Nta-Iw1LkmnDnQ-1; Thu, 22 Oct 2026 11:47:50 +0000 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 755861800663; Thu, 22 Oct 2026 11:47:48 +0000 (UTC) Received: from localhost (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3FC971955F06; Thu, 22 Oct 2026 11:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792669676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YoMIcrTq/DBPfeDgKUE341Lp+LFX1pQ4X5V2MP4UgNk=; b=FHwpog35E2w3GRIMdDxqOpP8pdrKDYCMO46HstimNBMD3/6YEZE6Ab0Si9t+aPhJcsqIZo 1M5hjcsuqbpR/TfCSiLFNf5eHkd8ZXoerIAR1/lfI9Tl0yhkVJp9vUE2QK7cXt5avBeEqv rJlel6xtBmvzpHIUW3L1bcPrTiCsr2Q= X-MC-Unique: tXewS536Nta-Iw1LkmnDnQ-1 X-Mimecast-MFC-AGG-ID: tXewS536Nta-Iw1LkmnDnQ_1792669668 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Thu, 22 Oct 2026 15:47:18 +0400 Subject: [PATCH v3 05/10] migration: tolerate NULL ram_block in vmstate_unregister_ram() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261022-nohmp-next-v3-5-8b581b590512@redhat.com> References: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> In-Reply-To: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> To: qemu-devel@nongnu.org Cc: Ani Sinha , Gerd Hoffman , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , Stefano Garzarella , Jared Rossi , Zhuoying Cai , Christian Borntraeger , Jason Herne , Halil Pasic , Eric Farman , Matthew Rosato , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Peter Xu X-Developer-Signature: v=1; a=openpgp-sha256; l=774; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=uFGhc+fwoSy8ID6dPKZO4z3ptkoUPaaN9gD46SNzoMQ=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBq2ffNdhuF7xTQvP37RPkORCzqnVHb8RuLX+fpl 19b5u4iuoGJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCatn3zQAKCRDa6OEJdZac 5QY/EACdr8BsHltrdysVGOXA+EdXc6Fu1xO1hNU8LBASboH77pkik588iquoQZuBKUxFD5aPRzA jVksU9v87kZcQHeSxWlNlSL9MNR7pJz2slUnSz3SOa4vH0bvowidl0hmLYYdF61d56W1pGkO37q FnpsWRPefCTXQG1kULVUf2Ad6znX6ErvUxY36PedOjJly5kN5sJCWUrL/qV6WQL9d7EU9KWDzzU p5GlrzfCIj52l9v09kTdRduCiN8VKqfYrt2NGncdnVVcpDQXhMSpGpDKkBB1bjyTdElOmni3CId 8r9dogECu1daPA822Yi56j6Tf+5ksRZsSPxYiFbzupm2zc3ReQXQ7L9uiS/uYsOSC/ZZkCm0kVX +Z7K2Sh852KvCM2MnuS11eV/WLn0dxDrDv4CA5DM0aCyd5e8NBmxs5y3Zw0nByftnFqd3aNVIOK 6TXL+dVwJjkmQfVYXPJ6UO7a2dHlNYXmOV0IeQHZ1IPGwHmfJL9OlIQb1ydHmXCUAMbo3B0WHe3 YOdhS837XGGKyQobizuoaujKneFj+R9F5pg9661sFJwO/CqrqVwEWgUztyYf+Y2gUI8Ng9aS69R Vk+KFn+mEOGx56UC5VTjj3qa1bY2owmzfMRFT9sH8+7MMdQs4ZmoNQtK/DGWpW9bPCFLxnog4be U9HUv46di1WGqNw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1792669760714158500 Treat a missing RAMBlock as nothing to unregister. qemu_ram_unset_idstr() already accepts a NULL block. Signed-off-by: Marc-Andr=C3=A9 Lureau --- migration/savevm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migration/savevm.c b/migration/savevm.c index 4b590ea672d2..fe94ba96e432 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -3610,6 +3610,9 @@ void vmstate_register_ram(MemoryRegion *mr, DeviceSta= te *dev) =20 void vmstate_unregister_ram(MemoryRegion *mr, DeviceState *dev) { + if (!mr->ram_block) { + return; + } qemu_ram_unset_idstr(mr->ram_block); qemu_ram_unset_migratable(mr->ram_block); ram_block_del_cpr_blocker(mr->ram_block); --=20 2.56.0.116.g6de20f6092dc From nobody Fri Oct 23 21:31:52 2026 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=1792669794; cv=none; d=zohomail.com; s=zohoarc; b=V757fTjg+GCE4ls4I4Td9OQar9SS7nmBxjbh3yXs3fXb6vWx71AJsX+Aqu2K4aEh5AtUnh0dNDjV4kRZB1sZrHEMGFh0WeoxSJBzt4tfBU+GA/GFTIOcNrj8UGE+A0AhpLJA+M9D6J4HuD140/VR+Zo/2at4C1F2yxdGfA3a15s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792669794; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/1fjiWygkRwux1lBwCGtl1AUmo2UCIH9Jml6qaPzOWQ=; b=FX5gD05bYWStpie8NMIedv6KhpucLp+ltzG4MVo9Yed8ip0YzYlx57eo/88VOm1B5v299QWFUq+pq0dtcOYdc83tvUeGtvUPG5bQFDV0dAj5vvgkSvR2TpTN8Gbb11oz7rQCNULc7S6z4KFahl1DTrQ2AKFK6Lh0K2DnRMxePhQ= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792669794706816.8030349212693; Thu, 22 Oct 2026 04:49:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJrIq-0008CC-EQ; Thu, 22 Oct 2026 07:49:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJrH6-0006kj-HA for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:11 -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 1xJrH4-0007GO-Fi for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:00 -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-607-DoRyfFrrOKuPhqdI7jg2LA-1; Thu, 22 Oct 2026 11:47:54 +0000 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 472A01800652; Thu, 22 Oct 2026 11:47:52 +0000 (UTC) Received: from localhost (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3AB6A1800480; Thu, 22 Oct 2026 11:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792669677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/1fjiWygkRwux1lBwCGtl1AUmo2UCIH9Jml6qaPzOWQ=; b=RQGpE2HggtZ/l5ZPEnAUA3kI93Qm1tnajgdEjzR8dVwYgDQ1BGqPV+PUJNtBwmcGeZkEFh eEZD4NSdHlAjxT4MZQcszx0d4uxHohp7+NMuINDuaBt5EMiyQB7Z70L2wpG6jgA0ypi2Bx N3n8CQVxHeHAlY5DWZHXYrl99mvcs4I= X-MC-Unique: DoRyfFrrOKuPhqdI7jg2LA-1 X-Mimecast-MFC-AGG-ID: DoRyfFrrOKuPhqdI7jg2LA_1792669672 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Thu, 22 Oct 2026 15:47:19 +0400 Subject: [PATCH v3 06/10] igvm: make IgvmMemoryRegion a QOM MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261022-nohmp-next-v3-6-8b581b590512@redhat.com> References: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> In-Reply-To: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> To: qemu-devel@nongnu.org Cc: Ani Sinha , Gerd Hoffman , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , Stefano Garzarella , Jared Rossi , Zhuoying Cai , Christian Borntraeger , Jason Herne , Halil Pasic , Eric Farman , Matthew Rosato , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=6350; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=U7m8WDF/BAK2Wf3yksj4Ah1D/30tnscuRyK47dRWL0M=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBq2ffNLaxGntlZSvspfl9NjlRmVNBSRpQnhtIFA MoP2oOE/4uJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCatn3zQAKCRDa6OEJdZac 5fsWD/471pKjMGtcE6lGQLuofu+3ZXpaYwr69kyo2Gkxzz8gpYdtIx8dTjKkY7arltrm/Qv2sVl N34BiJFwzeM5p+q+Q+KA+jJmNVZ2Nmo/8SfB3uHNxbuBgTCNvCx7Orov6Cr+bgvLHetO/ybcpER /uVNqnnZbFT+ApBQac/F7spieAJOC/ceXGnjUD2BttWI0ZYQslp788Le5Jb/YSTLxc4jZbNcCTu 1OuOy22n1qnsrcUmB/XPVBCD49Rsdz1sfzsBJkj3CepNGd+JVuFjUTSzPCD+W43jnnb+TDhSZCM g3IbkOJZhw8IX8qs4W3Kfg8ORNhraM80or6w2e+XduVA3Y/S0LU6NpZh9+jfof343FLhYykG9s8 A4XmunqtB8Ax+0XDxkZijvRYphL3Juth7WNQ0vUzi2ypjtoCBEK26Oi8z9NUilecWPYxmeK3Q0M Q2LzlTQdTUfHptLFUcKxygmXdv6fP3FbYpl/PV+l5wJrFASGCVP6wtinvIaL6uEiKAVaikqHwCS WKvG9HfxUDy/lM2HzCm2EEqfsJOFzd2YFyXnlAH5WcSVuN02UO81qlb09ds8kUIunoFxbjgSdWk JsxnLfq9QyEZri1o7iBlY5x9v4nhgkbsSpdvXWU25tWRkXh3GYnUR+kxb91jgg2u6xVOHMY+Xn6 ea7tbWSF7ehU+Rg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: qemu development 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: 1792669795368158500 Make IgvmMemoryRegion a QOM object, embedding MemoryRegion, and use it as the region owner. The IGVM list and memory subsystem can now hold references independently, and QOM frees after the last reference is dropped, fixing leaks reported by ASAN while running tests. - object_unparent() is no longer needed, children are automatically unref - switch to memory_region_init_ram_flags_nomigrate() as other helpers expect a DEVICE Signed-off-by: Marc-Andr=C3=A9 Lureau --- backends/igvm.c | 97 +++++++++++++++++++++++++-------------= ---- include/system/igvm-internal.h | 9 ++-- 2 files changed, 64 insertions(+), 42 deletions(-) diff --git a/backends/igvm.c b/backends/igvm.c index 7aa76441d0d0..e659fea25517 100644 --- a/backends/igvm.c +++ b/backends/igvm.c @@ -35,6 +35,12 @@ #define IGVM_VHT_OPTIONAL_BIT (1U << 31) #endif =20 +struct IgvmMemoryRegion { + Object parent_obj; + MemoryRegion mr; + QTAILQ_ENTRY(IgvmMemoryRegion) next; +}; + /* * Bit 31 of the variable header type indicates that the header is * optional and can be safely ignored by a loader that does not @@ -253,10 +259,13 @@ static void *qigvm_prepare_memory(QIgvm *ctx, uint64_= t addr, uint64_t size, int region_identifier, Error **errp) { ERRP_GUARD(); - IgvmMemoryRegion *imr =3D NULL; + g_autoptr(IgvmMemoryRegion) imr =3D NULL; Int128 gpa_region_size; + g_autofree char *region_name =3D NULL; + uint32_t flags =3D 0; MemoryRegionSection mrs =3D memory_region_find(get_system_memory(), addr, size); + if (mrs.mr) { if (!memory_region_is_ram(mrs.mr)) { memory_region_unref(mrs.mr); @@ -279,36 +288,29 @@ static void *qigvm_prepare_memory(QIgvm *ctx, uint64_= t addr, uint64_t size, return NULL; } return qemu_map_ram_ptr(mrs.mr->ram_block, mrs.offset_within_regio= n); - } else { - /* - * The region_identifier is the is the index of the IGVM directive= that - * contains the page with the lowest GPA in the region. This will - * generate a unique region name. - */ - g_autofree char *region_name =3D - g_strdup_printf("igvm.%X", region_identifier); - imr =3D g_new0(IgvmMemoryRegion, 1); - imr->mr =3D g_new0(MemoryRegion, 1); - if (ctx->machine_state->cgs && - ctx->machine_state->cgs->require_guest_memfd) { - if (!memory_region_init_ram_guest_memfd_private( - imr->mr, NULL, region_name, size, errp)) { - g_free(imr->mr); - g_free(imr); - return NULL; - } - } else { - if (!memory_region_init_ram(imr->mr, NULL, region_name, size, - errp)) { - g_free(imr->mr); - g_free(imr); - return NULL; - } - } - memory_region_add_subregion(get_system_memory(), addr, imr->mr); - QTAILQ_INSERT_TAIL(&ctx->cfg->memory_regions, imr, next); - return memory_region_get_ram_ptr(imr->mr); } + + /* + * The region_identifier is the is the index of the IGVM directive that + * contains the page with the lowest GPA in the region. This will + * generate a unique region name. + */ + region_name =3D g_strdup_printf("igvm.%X", region_identifier); + imr =3D IGVM_MEMORY_REGION(object_new(TYPE_IGVM_MEMORY_REGION)); + if (ctx->machine_state->cgs && + ctx->machine_state->cgs->require_guest_memfd) { + flags =3D RAM_GUEST_MEMFD_PRIVATE; + } + if (!memory_region_init_ram_flags_nomigrate(&imr->mr, OBJECT(imr), + region_name, size, + flags, errp)) { + return NULL; + } + vmstate_register_ram_global(&imr->mr); + memory_region_add_subregion(get_system_memory(), addr, &imr->mr); + object_ref(imr); /* for the list */ + QTAILQ_INSERT_TAIL(&ctx->cfg->memory_regions, imr, next); + return memory_region_get_ram_ptr(&imr->mr); } =20 static int qigvm_type_to_cgs_type(IgvmPageDataType memory_type, bool unmea= sured, @@ -1161,14 +1163,33 @@ void qigvm_cleanup_memory(IgvmCfg *cfg) { IgvmMemoryRegion *imr, *tmp; =20 - QTAILQ_FOREACH_SAFE(imr, &cfg->memory_regions, next, tmp) - { - trace_qigvm_cleanup_memory(imr->mr->name); - memory_region_del_subregion(get_system_memory(), imr->mr); - vmstate_unregister_ram(imr->mr, NULL); + QTAILQ_FOREACH_SAFE(imr, &cfg->memory_regions, next, tmp) { + trace_qigvm_cleanup_memory(imr->mr.name); QTAILQ_REMOVE(&cfg->memory_regions, imr, next); - /* this triggers MemoryRegion cleanup */ - object_unparent(OBJECT(imr->mr)); - g_free(imr); + object_unref(OBJECT(imr)); } } + +static void qigvm_memory_region_finalize(Object *obj) +{ + IgvmMemoryRegion *imr =3D IGVM_MEMORY_REGION(obj); + + if (imr->mr.container) { + memory_region_del_subregion(imr->mr.container, &imr->mr); + } + vmstate_unregister_ram(&imr->mr, NULL); +} + +static const TypeInfo qigvm_memory_region_info =3D { + .name =3D TYPE_IGVM_MEMORY_REGION, + .parent =3D TYPE_OBJECT, + .instance_size =3D sizeof(IgvmMemoryRegion), + .instance_finalize =3D qigvm_memory_region_finalize, +}; + +static void qigvm_register_types(void) +{ + type_register_static(&qigvm_memory_region_info); +} + +type_init(qigvm_register_types); diff --git a/include/system/igvm-internal.h b/include/system/igvm-internal.h index b3b64cb58444..c2ceb57ffa65 100644 --- a/include/system/igvm-internal.h +++ b/include/system/igvm-internal.h @@ -18,10 +18,11 @@ #include "system/confidential-guest-support.h" #include =20 -typedef struct IgvmMemoryRegion { - QTAILQ_ENTRY(IgvmMemoryRegion) next; - MemoryRegion *mr; -} IgvmMemoryRegion; +typedef struct IgvmMemoryRegion IgvmMemoryRegion; + +#define TYPE_IGVM_MEMORY_REGION "igvm-memory-region" + +OBJECT_DECLARE_SIMPLE_TYPE(IgvmMemoryRegion, IGVM_MEMORY_REGION) =20 struct IgvmCfg { Object parent_obj; --=20 2.56.0.116.g6de20f6092dc From nobody Fri Oct 23 21:31:52 2026 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=1792669787; cv=none; d=zohomail.com; s=zohoarc; b=CgCUI+BoLa0FPeNyoT2gQUSbUxTk9JYSh0M/7NcKbIUStp00pzzav8JbSV9DibSEOONpsZ+fbzNCU68BOjcLsQs7UUydPxGGUmScQpSzVrtrL6lPDVWKDL0YlXPumhZWW3CFQv7YhFrHy/miGDFn23UDwbW+C+fArDxHWZyHO3o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792669787; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XAMi0HrTLKQqtXBzHsADAyOWxkdskHxLY/vBFknjMN4=; b=QMgT+9HXjgbUaktylbKUr3yrx0QrYJNICGMYo5rUss+1GA+fps10HESK6kLgHjQUfcwTW1W1d3vyeKK59OijHOAtW7C6TsKNEddPp3tG0FG6cvXetVvZfmpcbR8x4vpSsKCayTA5zFBISQP8FTM8LJAZDIbr83VJiVB7zsNeDVU= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792669787853174.18808695872212; Thu, 22 Oct 2026 04:49:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJrIg-0007mY-PQ; Thu, 22 Oct 2026 07:49:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJrH8-0006lc-86 for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:11 -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 1xJrH6-0007H2-Pr for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:01 -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-231-2RmNFmVTPLaoRWuYSM6S1A-1; Thu, 22 Oct 2026 07:47:57 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 910EC1955F73; Thu, 22 Oct 2026 11:47:55 +0000 (UTC) Received: from localhost (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B030C1800444; Thu, 22 Oct 2026 11:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792669680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XAMi0HrTLKQqtXBzHsADAyOWxkdskHxLY/vBFknjMN4=; b=SWnf8HSUEZPS6GmmDkP45+fT9dyrPcscLPFF9YjGLI86Gm4IIQ2FoGWLZcUQ4VXvYuGtYl vJpv4K+2sCcylvku0EqH94GbZFbDqgMjz/XeVkDRhAdpLGHRSNGG1yaPPQpqt6Qh5iLdNu 26dgeTlvBoLjkbDuU4FR8363Uug39S4= X-MC-Unique: 2RmNFmVTPLaoRWuYSM6S1A-1 X-Mimecast-MFC-AGG-ID: 2RmNFmVTPLaoRWuYSM6S1A_1792669675 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Thu, 22 Oct 2026 15:47:20 +0400 Subject: [PATCH v3 07/10] hw/s390x/ipl: fix short SCSI loadparm buffer over-read MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261022-nohmp-next-v3-7-8b581b590512@redhat.com> References: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> In-Reply-To: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> To: qemu-devel@nongnu.org Cc: Ani Sinha , Gerd Hoffman , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , Stefano Garzarella , Jared Rossi , Zhuoying Cai , Christian Borntraeger , Jason Herne , Halil Pasic , Eric Farman , Matthew Rosato , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1872; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=F2rHJNlR/CFS/VceTNWL7HfX4e29ttJ+I9Xyczh3VNo=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBq2ffNpcAoRG9/cip0mOoDcmNEbGpZpGrq7kjGG 8s8efGiIwGJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCatn3zQAKCRDa6OEJdZac 5bdWEACUDfC4X2xx5VfVBiFQfyEbR6/HgCG3eyMm1kLlFsFhPITjohYXqJmBK1d18UJXKYPDrNl aPJ5SWkki5gizeyKwLyioCT80Ta1gjXX5+KhyigBALgdiBOZCPsZz1wcAX5qcmpNVQEpGqJNDoT TvlMGt+jdb8LzcUrS61yCdMv0sv/X0V5ZO3fn5Q4+WXNXLANbA9n0f6fnxSkUWjK6fU0aCwTB5W HSTsh7yMAcxX5RG1nJLYmHUaNJtvw6oipXbA3hbNc5y9HELCK4AcozHAgqfTgeYvweO6/ppPw0D X+VaEozUxXLN3//ppmkigFTsRYq3FJIU/PikSVaxtoy/naN/g9qmQTYDrYf9tGQbSmkpGyuU9gB eZZpSgYZb31l8gklJTXHu/knifoqVRbrUIVCW7CYuVzCrQAiHTQxZcmrhiBAhaG0/oIxfoVsEB5 KUbbvn8R3ZXRo8mWgA1zylxlDHJGJWjh/IyVU2g8pzwFN1ABAjHXHRE0kLUp95h/jJBfJOF4xDV hI+F32vX0f1e4/mON2hErrDrBrN6a0qeAQ4cjvvUZrsWP4nsNwgHnzv9q20ZoEABVfOJwd9ktKq aMufTaHfQmq87roULZT3/yhzlLEvoW3L1hev0+OCOkVF9tXPfBPXriAvzOlFO4p58P5KTU/st1U 4OBg9OBeYO4Ajgg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1792669789295158500 s390_build_iplb() initially points lp at the eight-byte CCW loadparm array. For SCSI devices, it can replace lp with a variable-length string returned by object_property_get_str(). The following memcmp() still reads eight bytes. ASan reports buffer-overflow on value "3", when running test_scsi_loadparm func-s390x-boot_4k test. Check the fixed-size CCW loadparm for the 8-zero before the SCSI property can replace lp. Fixes: 429442e52d94 ("hw: Add "loadparm" property to scsi disk devices for = booting on s390x") Reviewed-by: Jared Rossi Reviewed-by: Eric Farman Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/s390x/ipl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 1add11ad7b2c..fe107af84de0 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -570,6 +570,11 @@ static bool s390_build_iplb(DeviceState *dev_st, IplPa= rameterBlock *iplb) if (ccw_dev) { lp =3D ccw_dev->loadparm; =20 + /* If the device loadparm is empty use the global machine loadparm= */ + if (memcmp(lp, NO_LOADPARM, 8) =3D=3D 0) { + lp =3D S390_CCW_MACHINE(qdev_get_machine())->loadparm; + } + switch (devtype) { case CCW_DEVTYPE_SCSI: sd =3D SCSI_DEVICE(dev_st); @@ -605,11 +610,6 @@ static bool s390_build_iplb(DeviceState *dev_st, IplPa= rameterBlock *iplb) break; } =20 - /* If the device loadparm is empty use the global machine loadparm= */ - if (memcmp(lp, NO_LOADPARM, 8) =3D=3D 0) { - lp =3D S390_CCW_MACHINE(qdev_get_machine())->loadparm; - } - s390_ipl_convert_loadparm((char *)lp, iplb->loadparm); iplb->flags |=3D DIAG308_FLAGS_LP_VALID; =20 --=20 2.56.0.116.g6de20f6092dc From nobody Fri Oct 23 21:31:52 2026 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=1792669812; cv=none; d=zohomail.com; s=zohoarc; b=FS469D4l1wqAXsTyz4SUEjEe/+7c0BkiOWWhw0JTfhEr9FbZ1i894M4LCWL2mtVc7zx1U+0fRl2A+X2TCRhb12BKmORxGmFk6V1MwFHUpSudrtEGr3UKk25NGrCNgdC6ytkR+UKBq73u2hTgNxaWx/Xw4BFBBS+SWs6WXCE5CDI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792669812; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=m7UAMGndHkBAfWYQV2L+hjiZYl2wV/DuHcskbi9k/eA=; b=CQuSH0jNthHUnqAUVJ1+z0Q9i+nRjEw5BaOhRBDGyeYumwJ/P3BwKi+7AJByNTqC+WPT6Ietzo5b/1KYgsGeHG62er283mql4bSwn5qdGoL967npZ7otFDd3NFwId39l3hDNbZL9/DHmuLItM0UM+OeesarKLabCnnxhqu1Ko1s= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792669812579962.7072401565919; Thu, 22 Oct 2026 04:50:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJrIW-0007Wv-MM; Thu, 22 Oct 2026 07:49:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJrHD-0006ly-5W for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:11 -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 1xJrHB-0007IA-Lb for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:06 -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-240-TGH_1WcaPdaeMdggEdoyIA-1; Thu, 22 Oct 2026 07:48:01 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 1A1EC18011D7; Thu, 22 Oct 2026 11:47:59 +0000 (UTC) Received: from localhost (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3E2541956089; Thu, 22 Oct 2026 11:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792669685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m7UAMGndHkBAfWYQV2L+hjiZYl2wV/DuHcskbi9k/eA=; b=bHQ5fyHiGhVCfzK1iDsKuuluv+ZoMDNA7jebJni9EZypA7thJY/dzDDKiU02sAj8oJxZqj GVwagAv9WFdPBTfWD838z1+ImmA4FkUl26juFsT9vzDpU7kE15wcC1oFnCID+3KK0oqj91 Ki6mS/6MlK/qPOxJwm3d7ZTNbs5WCwU= X-MC-Unique: TGH_1WcaPdaeMdggEdoyIA-1 X-Mimecast-MFC-AGG-ID: TGH_1WcaPdaeMdggEdoyIA_1792669679 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Thu, 22 Oct 2026 15:47:21 +0400 Subject: [PATCH v3 08/10] glib-compat: fix g_autofd fallback warnings MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261022-nohmp-next-v3-8-8b581b590512@redhat.com> References: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> In-Reply-To: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> To: qemu-devel@nongnu.org Cc: Ani Sinha , Gerd Hoffman , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , Stefano Garzarella , Jared Rossi , Zhuoying Cai , Christian Borntraeger , Jason Herne , Halil Pasic , Eric Farman , Matthew Rosato , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Alex_Benn=C3=A9e?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1158; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=NK+pnxc7BwpVlq2y77Nbo1afqzbRfgLVGEkssM4T99c=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBq2ffNtWSdxwlshpFRGcxwuyQ2vTCJNsmoyqhCn C0df2cbB2OJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCatn3zQAKCRDa6OEJdZac 5d+gD/0WY9ksEOF8rWTVkj+o8om2zXTgjZiEmasZCNFWP7Ui5ZXh54yqSDt13w8iNsaN4qQIlHK CsKPXgOatmGQeuHFd9X207ktVpHFNIz38OeQlD9GEI/A/uk57SLLHM80jz2XRsyLyPioqqZHvZY GffxzsPoCVpMH+7Su+Rm7VmyWiOX6Y/Jrb6wc0zbp7DuXHh4zDuKsMDIIm9HFPqWZJFthxF+DwB VDJNMbunm4ssolGYKbYa+FFH2PnEZkFQ4NyDRDbGct8z0NJFWlo5IqMMToN0HgFFnTyOebUPpNu uV42sYGWkYURz3fNPQ6PwIWuR2eEA/W13m30/caCUgsfTq4Yo04VBA1IC6meE+DSBCPjcTUN8Nd z8Q61PPuIJpnmbe4QMGwL2CuUd6rDZkDwZ7YcVgbwA1drPEuV1GhkxfSkn0dqccKx72lmZMzhH8 iBNklzri5WjVLs1V05RxVVHurONm/9qjexYBb3D8gk/08Xn4z7Tzg+2qXltEKHBUFroylQOSw58 Kw7fLSvhGT+qbpPA/7AkG9QRcLH44TDqcfehvR5JpmcqHgxMnQadRScw933b9cIj7rdQwEOOei/ nuAIhn2unv95LWHqYQ1NNETrxHnwJZFqhZ8BknoqCu3P/kwSFLPXDV6d8sVmuSpP77MpBGYOhhg bJLEsOqhZfDEzLQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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: qemu development 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: 1792669813856158500 The g_autofd fallback is warning because it uses symbols from >=3D2.66 Fixes: 1599015a7a1a ("glib-compat: add fallback for g_clear_fd/g_autofd") Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/glib-compat.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/glib-compat.h b/include/glib-compat.h index 32ee2afdcdf5..dd6f062f5a43 100644 --- a/include/glib-compat.h +++ b/include/glib-compat.h @@ -148,15 +148,15 @@ static inline gboolean g_clear_fd_qemu(int *fd_ptr, G= Error **error) } #define g_clear_fd(fd, err) g_clear_fd_qemu(fd, err) =20 -#if !GLIB_CHECK_VERSION(2, 76, 0) -static inline void _g_clear_fd_ignore_error(int *fd_ptr) +static inline void _g_clear_fd_qemu_ignore_error(int *fd_ptr) { int errsv =3D errno; g_clear_fd(fd_ptr, NULL); errno =3D errsv; } -#define g_autofd __attribute__((cleanup(_g_clear_fd_ignore_error))) -#endif + +#undef g_autofd +#define g_autofd __attribute__((cleanup(_g_clear_fd_qemu_ignore_error))) =20 #pragma GCC diagnostic pop =20 --=20 2.56.0.116.g6de20f6092dc From nobody Fri Oct 23 21:31:52 2026 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=1792669816; cv=none; d=zohomail.com; s=zohoarc; b=eaGOQLO7yqjNmOk7r3x5xDpfCQy8Yp5C7mqa/5MbNzSs01wiDhABiA2UHa/NtPJL0FDIuTxSjGK9yxz4iVGvaH9fD0DHGBR2q1Bb2n12bTC5YjcyvEezzwKkDvHK43UvCzLzUqp2wMXiKUUR5UWpBCXG4JJuNmABNgv9ca7GOwk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792669816; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FujpUDGVZaJGZHjNg46qd4GgLkVzbOQUl0Lo+C7bKQk=; b=BZcTZC02EA5gGBn83YuAnv6SX27UwPiX9JY7eF1gKKawtEvKkuyrE64rbTLdF8TYdh7azNX+HRWr1VAKWcdSY8cblbjgBfS3mJdaB3LE8IeReQHzRs3lImvVuX3tMcKcQ/7AdBWH2siC62yL5iE3XLjVyFeXAuLJsvlVcHYmwDM= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792669816987824.0849176412606; Thu, 22 Oct 2026 04:50:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJrJE-0000ro-RV; Thu, 22 Oct 2026 07:50:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJrHT-0006vP-74 for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:27 -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 1xJrHQ-0007Kr-Jr for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:21 -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-549-osoJASdqOwWTrDBbFX2UEQ-1; Thu, 22 Oct 2026 11:48:13 +0000 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 7577F18005A0; Thu, 22 Oct 2026 11:48:02 +0000 (UTC) Received: from localhost (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6B7781800480; Thu, 22 Oct 2026 11:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792669699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FujpUDGVZaJGZHjNg46qd4GgLkVzbOQUl0Lo+C7bKQk=; b=jMHYNeMO19dU53XvD3or9T2pmFD780OvsNCl2WO3g/Ex0qOK0EkF2jL6m1A7ZLU2+yfllt wD1bgy08s6nn6vkhsKBWwIJnrJakSB37qzv+kcG8k6pb62mEiWzBR+g2rLwvR1h0PIBco8 SwQue3EEfZVAcawIUCyPH+1n6nIkQRc= X-MC-Unique: osoJASdqOwWTrDBbFX2UEQ-1 X-Mimecast-MFC-AGG-ID: osoJASdqOwWTrDBbFX2UEQ_1792669682 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Thu, 22 Oct 2026 15:47:22 +0400 Subject: [PATCH v3 09/10] tests/exynos4210_uart_fifo-test: fix buffer leaks MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261022-nohmp-next-v3-9-8b581b590512@redhat.com> References: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> In-Reply-To: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> To: qemu-devel@nongnu.org Cc: Ani Sinha , Gerd Hoffman , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , Stefano Garzarella , Jared Rossi , Zhuoying Cai , Christian Borntraeger , Jason Herne , Halil Pasic , Eric Farman , Matthew Rosato , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Alex_Benn=C3=A9e?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1184; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=BRj8nTj/h5jiYm5/VZSXhg5EUw24S+JVPkcosvSgD5k=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBq2ffN2RoEsv96v3tt+xG0fQ6ousoO/IAa/vedz g+79K/5NISJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCatn3zQAKCRDa6OEJdZac 5ToXD/9rXdKBNKylaEsp8suO4UMDI10PxAzUvTCAyKyp/oAVJOSYF0+z32XoTg1eZFjCelDhf88 5qfzgSktK0mJN+qBEBjwpMrVWc3OI35GNj16VyFa3jHV96ipfdXGjNQazmDF7NEbKw2ykentONh 72Dzt9UVcd4jqfVP0aYMVut1BIm5ZhlCiaCG5j7/Q8jWWxhDLtHSUE9I2MFjUiDmmo78M7MMFeM /dl/b2vZvtgHoxBBryefF5Wb9ytT0h+NJbiimEDeeIdwMZWMrN7Iq9iTNljIPMUxq6CKHLa7v0l eNYfLd6VzpmKn9MehgdtqWy3lJ5X9oN7ANL0TKdi2rkTBtx6l2VrDdCjYvAmrkpHvjd1MP7zPDW /rvJKKc5a3Y4M6B3hJgVGZeraTB5SqNTYGHfHIo+3gt2XRk0EeZ+h/VDJHE3ZUzzfOGrk4ahvaf Lxwvpb0RdhtGGkgLjxbQEfOPHvV32yVcFPE7T8UjPgIJ/mFefd4nU1v5P9f/auciwLDfFNUlsNz 3zPjy2FlqLew0AjTPpk5eE55t/HKlZ0Tdqk1UM285YmoTkmInZKl2L8V0iEs5q8DJd4IgzOlnvE NFBkVLN6btB+taN9DEhdS93tAe56jLwGF1WjreeI31e9R/8u8Zqz1cBFCUuHFHCeyXnkC9gpVIq ABT764x2Fvo9QeA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: qemu development 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: 1792669817903158500 Reported by ASAN. Fixes: 6d459c75cfc4 ("tests/qtest: add test for exynos4210 uart fifo overfl= ow bug") Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/qtest/exynos4210_uart_fifo-test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/qtest/exynos4210_uart_fifo-test.c b/tests/qtest/exynos42= 10_uart_fifo-test.c index 54c09a6de723..c336ed22b028 100644 --- a/tests/qtest/exynos4210_uart_fifo-test.c +++ b/tests/qtest/exynos4210_uart_fifo-test.c @@ -52,8 +52,8 @@ static void enable_uart_fifo(QTestState *qts) */ static void test_recv_large_str(void) { - int sock_fd; - char *sendbuf, *recvbuf; + g_autofd int sock_fd =3D -1; + g_autofree char *sendbuf =3D NULL, *recvbuf =3D NULL; QTestState *qts =3D qtest_init_with_serial("-M smdkc210", &sock_fd); =20 enable_uart_fifo(qts); @@ -71,8 +71,6 @@ static void test_recv_large_str(void) g_assert_true(TEST_BUFFER_LEN - 1 =3D=3D strlen(recvbuf)); g_assert_true(strcmp(sendbuf, recvbuf) =3D=3D 0); =20 - close(sock_fd); - qtest_quit(qts); } =20 --=20 2.56.0.116.g6de20f6092dc From nobody Fri Oct 23 21:31:52 2026 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=1792669796; cv=none; d=zohomail.com; s=zohoarc; b=Qv+0zKjG4bYma8sLFNhvE4okkMzRcd+HGxI0Jm8YGm/FxA5TYS4bb/Q8r42SbT/j3wJjwNUPAFFYo7Kh9lzfnkTrwZUCmxOnc6h2P0UsR35D8Anh9csbDysTZKtuGJAmSW7TMe9IRzzXt6qRJQwDz0L4HYZDkwKhNX+W8Z+vpqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792669796; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0tDABSE3pTCICLY9FmNTqSUPOMsAIDyqPC5pZoQ/qiY=; b=D58PM56e5IBwyanJr2dvyllR9R6WJnHWRGHupiZJ7pYOHpCpT0cVFHJnpKZrljB2MFARmxgkn76g+dbftVgvYdOByk32xiJ5U57kfohiRXATJHDxk5X0rnNuU2rnAOfwzhIEy94vN2Eoy/jRmN40vyoHkL7pfPQqPLANQ9wAHpQ= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792669796965377.24748359144826; Thu, 22 Oct 2026 04:49:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xJrIq-00087u-4H; Thu, 22 Oct 2026 07:49:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xJrHK-0006pW-2C for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:15 -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 1xJrHI-0007JB-Ik for qemu-devel@nongnu.org; Thu, 22 Oct 2026 07:48:13 -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-460-I-V2zejcPaSEV0B_DcQrYw-1; Thu, 22 Oct 2026 11:48:08 +0000 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 5115D1956054; Thu, 22 Oct 2026 11:48:06 +0000 (UTC) Received: from localhost (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3C4281956089; Thu, 22 Oct 2026 11:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792669692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0tDABSE3pTCICLY9FmNTqSUPOMsAIDyqPC5pZoQ/qiY=; b=Cm60CaqPDq0rPPqb1Re4uNcF4MwYjj5FBMjyPuZ11DGIIulmGPSNSRSjDi5ck0pTxZfG4B oyZTNEqLrfLC4fcZRBIb5OjCLjYmOFtqIPWk+PQOnHnDsGotD6o12hYBD7VEu/3vBWk4bX 1gPsNqM/xdSSWiOj0OE0Yyurjym5zuc= X-MC-Unique: I-V2zejcPaSEV0B_DcQrYw-1 X-Mimecast-MFC-AGG-ID: I-V2zejcPaSEV0B_DcQrYw_1792669686 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Thu, 22 Oct 2026 15:47:23 +0400 Subject: [PATCH v3 10/10] tests/xilinx-zynq-sdhci-test: fix GIOChannel leak MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261022-nohmp-next-v3-10-8b581b590512@redhat.com> References: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> In-Reply-To: <20261022-nohmp-next-v3-0-8b581b590512@redhat.com> To: qemu-devel@nongnu.org Cc: Ani Sinha , Gerd Hoffman , Fabiano Rosas , Laurent Vivier , Paolo Bonzini , Stefano Garzarella , Jared Rossi , Zhuoying Cai , Christian Borntraeger , Jason Herne , Halil Pasic , Eric Farman , Matthew Rosato , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , qemu-block@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1290; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=q8J/y3hmdKkcrVl9eijNHa5xCK6axq1o5tLk9qkNbJ4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBq2ffOjE5lbQJMRPf3uHjmjEF6g6+cxUEq/SlHC ox8rXFnNbuJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCatn3zgAKCRDa6OEJdZac 5dR/EACUXwZBPFFg239eqvP4hK3+x1oXR/wxTR1CxxzYktmge5H9Mz/IxKsz7dfXljphJLvn+Dp Lo80aIjAeWIj2FouECua5nYTSrtIpNK4NCzobsyro+OB2Hg/3pnd2gq2uyx62j7E27c9ndpAOOh Zw6TlKBMuZWAJRxrWTw3qj9wS6/3LJuDya1TRVfFMP/9BdX6n/3SFs9nmEmGPvNn5Tw4G8+b3P/ jjRTOUtZ/aDgkGJVUWjyUBIxlRZunpQdlPHuzHKflZd/YcatzjjPBVanulLP0idMHStYkDo1VxY US2o7qwFiZ3WfAzlZp1klkUrt+t8L6Yy8zaZKhNPJs7bxQchKUWHcccuDNX/seV18YPJo4hFc15 KWyytSWyKF6xaIt6nEdbPrtB2sUEz+eBiunm4mwiU2mQuIqjPv+pxqqs5SG9t39WljPqS2Owyem CezHxssQEA7N/HjhVPUFs64mKtQKNlrn7SkpkqOnn2m3KZNeRkOWUQ7HfpG7W2mOevOFR3wcmEj ZkTeABAXK1GRWd8ylXDz2Hu7KDo/rYuh+DJy+ojBx8St2Oo5g53jDsod1sJsxXXkfJbKfxVN+Qu qmhnoEidHVPcK7cb5McJTR85pLQ/DArgZ2f70BBPOmScBB2ieBslZZXcLOegRnRefSc8tS4bTed 4Jtr+WfbD+HBdgQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1792669799406158500 Reported by ASAN. Fixes: 255c627c645b ("qtest: add xilinx-zynq SDHCI sdma test") Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/qtest/xilinx-zynq-sdhci-test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/qtest/xilinx-zynq-sdhci-test.c b/tests/qtest/xilinx-zynq= -sdhci-test.c index 7957358cf5d4..42e1b8f46e88 100644 --- a/tests/qtest/xilinx-zynq-sdhci-test.c +++ b/tests/qtest/xilinx-zynq-sdhci-test.c @@ -58,10 +58,10 @@ static QTestState *setup_sd_card(void) =20 static void write_pattern_to_image(size_t offset, size_t len) { - gchar *buf =3D g_malloc(len); + g_autofree gchar *buf =3D g_malloc(len); + g_autoptr(GIOChannel) chan =3D NULL; GError *err =3D NULL; gsize bytes_written; - GIOChannel *chan; =20 for (size_t i =3D 0; i < len; i++) { buf[i] =3D (i * 13 + 7) & 0xff; @@ -78,8 +78,6 @@ static void write_pattern_to_image(size_t offset, size_t = len) g_assert_cmpint(bytes_written, =3D=3D, len); g_io_channel_shutdown(chan, TRUE, &err); g_assert_no_error(err); - - g_free(buf); } =20 static void wait_for_block_count(QTestState *qts, uint16_t expected) --=20 2.56.0.116.g6de20f6092dc