From nobody Sun May 5 09:56:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1669476392; cv=none; d=zohomail.com; s=zohoarc; b=KhHgHr5CBIUMExwsqHw4ZWB4NRfBT8sKCNC7s4xTT9+XETS60MCriz0uaJv6TK7KBuQJUVZpGbEZTA8K1eNxe0RKMKgx2P2kjXdcVAt59/A5FKeQPmTrB7Jie2uQE1qBwEiffL4kCPjatqxE/qcJbANivvFGH/0hx1HrfzN0Sek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669476392; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=cpqDLkwLW3QukReeKO8DPefNBxSH1W7Z+pDenPVzmNM=; b=HY3F5yRT2cy0wiX9y8JH6H/Dl2gGhBXt+CBOjiz2/5N0ZbKnma3YmZf8BMveLvCn8XJz0k+p8uTaAKtTDUZpj+GkuRSl4+TAs89EjXCh8y2GbgesZYbQpGm4sCMmzcfkXp9WtRHlpN0aAFYMIUT3p4dEOVTj39aRGJMPeydBUx0= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1669476392895402.34321096908855; Sat, 26 Nov 2022 07:26:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyx3o-0008Oh-VL; Sat, 26 Nov 2022 10:25:44 -0500 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 1oyx3m-0008Nm-RN for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:42 -0500 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyx3l-0006tr-FC for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:42 -0500 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id 2ECF7DA0498; Sat, 26 Nov 2022 16:25:39 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id 2AEE746000E; Sat, 26 Nov 2022 16:25:39 +0100 (CET) To: qemu-devel@nongnu.org, "Michael S . Tsirkin" Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 for-7.2 1/6] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM) Date: Sat, 26 Nov 2022 16:25:02 +0100 Message-Id: <20221126152507.283271-2-sw@weilnetz.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221126152507.283271-1-sw@weilnetz.de> References: <20221126152507.283271-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=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: , Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1669476394855100002 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Stefan Weil Message-Id: <20220422070144.1043697-2-sw@weilnetz.de> Signed-off-by: Laurent Vivier Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- subprojects/libvhost-user/libvhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvho= st-user/libvhost-user.c index ffed4729a3..d9a6e3e556 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -651,7 +651,7 @@ generate_faults(VuDev *dev) { =20 if (ioctl(dev->postcopy_ufd, UFFDIO_REGISTER, ®_struct)) { vu_panic(dev, "%s: Failed to userfault region %d " - "@%p + size:%zx offset: %zx: (ufd=3D%d)%s\n", + "@%" PRIx64 " + size:%zx offset: %zx: (ufd=3D%d)= %s\n", __func__, i, dev_region->mmap_addr, dev_region->size, dev_region->mmap_offset, --=20 2.35.1 From nobody Sun May 5 09:56:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1669476393; cv=none; d=zohomail.com; s=zohoarc; b=J6rqhEZ21G6IHr/n9S8XEcpIPpId4lUF2e4oBHG9+qUZwLIfhEfAzRsefC90ilpaLDGyxraldZyU+7x7hHVdKpIlspr80BuhY5gZ3fwlMguvRCMGkaIOZQS+K+S8S8NRP+lF9NAxw4NbXnRadIhw0e2MJv8A36B3o7+HCq/1Lug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669476393; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=2IGgT8R/Y6xuQKtY3IQojtI5/raQhc1OlGEfMEQHg1E=; b=HUSu6Dm1RLAmPvN+ScES/LCeZuC/61byBOrf5j4c3MK9UOVO0EZR7ALlTn1FNYXBBadcgp3OjSKq2xv5r4ZZ54JgZBGHhb0JvBfcCFrU3ZmdgAobbb78sXCE1t2+ONdDLmOjV/k4IGzBxqh0g77bvAeAcAA2ohzHuco7tuORY68= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1669476393566625.9110684116724; Sat, 26 Nov 2022 07:26:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyx3n-0008OJ-UY; Sat, 26 Nov 2022 10:25:43 -0500 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 1oyx3n-0008Nq-1j for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:43 -0500 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyx3l-0006tw-Kl for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:42 -0500 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id 57042DA1049; Sat, 26 Nov 2022 16:25:40 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id 53F1746000E; Sat, 26 Nov 2022 16:25:40 +0100 (CET) To: qemu-devel@nongnu.org, "Michael S . Tsirkin" Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 for-7.2 2/6] libvhost-user: Fix format strings Date: Sat, 26 Nov 2022 16:25:03 +0100 Message-Id: <20221126152507.283271-3-sw@weilnetz.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221126152507.283271-1-sw@weilnetz.de> References: <20221126152507.283271-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=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: , Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1669476394831100001 Signed-off-by: Stefan Weil Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20220422070144.1043697-3-sw@weilnetz.de> Signed-off-by: Laurent Vivier Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- subprojects/libvhost-user/libvhost-user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvho= st-user/libvhost-user.c index d9a6e3e556..d67953a1c3 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -700,7 +700,7 @@ vu_add_mem_reg(VuDev *dev, VhostUserMsg *vmsg) { if (vmsg->size < VHOST_USER_MEM_REG_SIZE) { close(vmsg->fds[0]); vu_panic(dev, "VHOST_USER_ADD_MEM_REG requires a message size of a= t " - "least %d bytes and only %d bytes were received", + "least %zu bytes and only %d bytes were received", VHOST_USER_MEM_REG_SIZE, vmsg->size); return false; } @@ -826,7 +826,7 @@ vu_rem_mem_reg(VuDev *dev, VhostUserMsg *vmsg) { if (vmsg->size < VHOST_USER_MEM_REG_SIZE) { vmsg_close_fds(vmsg); vu_panic(dev, "VHOST_USER_REM_MEM_REG requires a message size of a= t " - "least %d bytes and only %d bytes were received", + "least %zu bytes and only %d bytes were received", VHOST_USER_MEM_REG_SIZE, vmsg->size); return false; } --=20 2.35.1 From nobody Sun May 5 09:56:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1669476387; cv=none; d=zohomail.com; s=zohoarc; b=OZn0Dm2ktR7KMqqHqjFOAOm1oMMGFvaEaxTLhjynO53NcOyxBZ4S84Pq9U4w/XldyR/5hTQ7ACZTJegIJeX8XD0KZi6Zk/Ltvorviwe9vECwDrzuRol+koPH8EHMXfP/EHixU5nu612+7V4nz3u0j+j64kFNwzZ7KKvALmaNQMo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669476387; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=i6KDgANb9X2GgNCLEl/XHSN2GDGRroyDv8QBkkB94XM=; b=ZA1UeNpgG1nZMaDxC9kxRPsSnFRbXbojNWt0sWwGLKRwD+Os0HwW5io6wstgzkUSGuxvslBcpO0IsS9aroxr7rO7j/2P6Kx1lJ8326dFUismGFTf2bc1ye+ZVWWw9XOFWCGgKmSTx8joR1rJXA7WQggFzLUBZQjQFUmatrgQHCc= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16694763877981012.7370485947132; Sat, 26 Nov 2022 07:26:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyx3w-0008PO-Jy; Sat, 26 Nov 2022 10:25:52 -0500 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 1oyx3u-0008P6-I9 for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:50 -0500 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyx3s-0006ue-Ts for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:50 -0500 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id CB279DA0498; Sat, 26 Nov 2022 16:25:47 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id C851B46000E; Sat, 26 Nov 2022 16:25:47 +0100 (CET) To: qemu-devel@nongnu.org, "Michael S . Tsirkin" Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil Subject: [PATCH v3 for-7.2 3/6] libvhost-user: Fix two more format strings Date: Sat, 26 Nov 2022 16:25:04 +0100 Message-Id: <20221126152507.283271-4-sw@weilnetz.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221126152507.283271-1-sw@weilnetz.de> References: <20221126152507.283271-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=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: , Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1669476389068100003 Content-Type: text/plain; charset="utf-8" This fix is required for 32 bit hosts. The bug was detected by CI for arm-linux, but is also relevant for i386-linux. Reported-by: Stefan Hajnoczi Signed-off-by: Stefan Weil Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- subprojects/libvhost-user/libvhost-user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvho= st-user/libvhost-user.c index d67953a1c3..80f9952e71 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -651,7 +651,8 @@ generate_faults(VuDev *dev) { =20 if (ioctl(dev->postcopy_ufd, UFFDIO_REGISTER, ®_struct)) { vu_panic(dev, "%s: Failed to userfault region %d " - "@%" PRIx64 " + size:%zx offset: %zx: (ufd=3D%d)= %s\n", + "@%" PRIx64 " + size:%" PRIx64 " offset: %" PRIx= 64 + ": (ufd=3D%d)%s\n", __func__, i, dev_region->mmap_addr, dev_region->size, dev_region->mmap_offset, --=20 2.35.1 From nobody Sun May 5 09:56:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1669476414; cv=none; d=zohomail.com; s=zohoarc; b=Iiz2RxAxo0F3mpWynHpvh+eYJ5HPlAusoEVaZlRUJwC+KhyNnzw/XYkcsvpKuDrCOK0ayKCdSLh6UMOSWL30TNcGWnNwhCM5dHAtte1Ns4iGw8Wh0XjPQ0iqwqZGaLmTUwU7da70l4Ed1UpENVI/CvdmEhDRi8zhSTBmk5REGg0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669476414; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=kl+Qah+e4JUPojJvVP/uVn9grHLi1R+75IJ+Ik7WQkA=; b=Wfc8tPZirRBnQWyuqil3wYtq6gfOFycYyLzUepRU5n+ZjCIU/O4PV49lD71IwWCcY4COaK6msFW5XBtQqNCRQuWqRZbAnaULlQH/uANgnMqWrPUlaA0X/QnIUNYD7KgNUVyhs9VRhaSlHPJ8gPTiJ9xFUxCA49vgNQc7RtfXsOU= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1669476414118306.54875935608527; Sat, 26 Nov 2022 07:26:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyx3x-0008Sk-H2; Sat, 26 Nov 2022 10:25:53 -0500 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 1oyx3v-0008PG-8J for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:51 -0500 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyx3t-0006uj-QJ for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:51 -0500 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id B131BDA1049; Sat, 26 Nov 2022 16:25:48 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id AE0A746000E; Sat, 26 Nov 2022 16:25:48 +0100 (CET) To: qemu-devel@nongnu.org, "Michael S . Tsirkin" Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 for-7.2 4/6] libvhost-user: Add format attribute to local function vu_panic Date: Sat, 26 Nov 2022 16:25:05 +0100 Message-Id: <20221126152507.283271-5-sw@weilnetz.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221126152507.283271-1-sw@weilnetz.de> References: <20221126152507.283271-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=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: , Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1669476414799100001 Signed-off-by: Stefan Weil Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20220422070144.1043697-4-sw@weilnetz.de> Signed-off-by: Laurent Vivier Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- subprojects/libvhost-user/libvhost-user.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvho= st-user/libvhost-user.c index 80f9952e71..d6ee6e7d91 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -45,6 +45,17 @@ #include "libvhost-user.h" =20 /* usually provided by GLib */ +#if __GNUC__ > 2 || (__GNUC__ =3D=3D 2 && __GNUC_MINOR__ > 4) +#if !defined(__clang__) && (__GNUC__ =3D=3D 4 && __GNUC_MINOR__ =3D=3D 4) +#define G_GNUC_PRINTF(format_idx, arg_idx) \ + __attribute__((__format__(gnu_printf, format_idx, arg_idx))) +#else +#define G_GNUC_PRINTF(format_idx, arg_idx) \ + __attribute__((__format__(__printf__, format_idx, arg_idx))) +#endif +#else /* !__GNUC__ */ +#define G_GNUC_PRINTF(format_idx, arg_idx) +#endif /* !__GNUC__ */ #ifndef MIN #define MIN(x, y) ({ \ typeof(x) _min1 =3D (x); \ @@ -151,7 +162,7 @@ vu_request_to_string(unsigned int req) } } =20 -static void +static void G_GNUC_PRINTF(2, 3) vu_panic(VuDev *dev, const char *msg, ...) { char *buf =3D NULL; --=20 2.35.1 From nobody Sun May 5 09:56:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1669476449; cv=none; d=zohomail.com; s=zohoarc; b=MFx9kjSBNLq0FIzvfwUDeMFVVS7m+b4gAxVdBZSzYM/3BREovaTRaM4A0LMH4Ggg/DpSwxhBBpsBXMTQQT63Rzh05pW+W4v3fF7uT5iTH6A6psFjoXIFCOcs4D0zI3DILMTAx1wz4owvhD9ZSmhzon8ThyfOMU5ccsVj8tV2As0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669476449; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=t+06/7Cyn77LYSggADxHvc4w4RcnT0uiLSfj0caGO58=; b=mKL1932mQZn1Dh/ZKUJldIMh3/HjfsfDTNWgN68sPfk+r8jGjbzPoE2Tuj78b0MX9APTqMTFV9De2k34rj7Kuf3gx1ufLx+e6U5YUH6VyJcOl5JTWeJyZmgs9DNjdJIBaGT2m+JnVq4/3AltB/KmYP5YVvlaQbG7eF+Xuj9STKY= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1669476449125245.03512705398293; Sat, 26 Nov 2022 07:27:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyx3y-0008UE-RG; Sat, 26 Nov 2022 10:25:54 -0500 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 1oyx3v-0008PP-T7 for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:52 -0500 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyx3u-0006um-Hl for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:51 -0500 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id 70D1FDA1166; Sat, 26 Nov 2022 16:25:49 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id 6E34646000E; Sat, 26 Nov 2022 16:25:49 +0100 (CET) To: qemu-devel@nongnu.org, "Michael S . Tsirkin" Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil Subject: [PATCH v3 for-7.2 5/6] MAINTAINERS: Add subprojects/libvhost-user to section "vhost" Date: Sat, 26 Nov 2022 16:25:06 +0100 Message-Id: <20221126152507.283271-6-sw@weilnetz.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221126152507.283271-1-sw@weilnetz.de> References: <20221126152507.283271-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=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: , Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1669476451000100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Stefan Weil Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index cf24910249..6966490c94 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2005,6 +2005,7 @@ F: docs/interop/vhost-user.rst F: contrib/vhost-user-*/ F: backends/vhost-user.c F: include/sysemu/vhost-user-backend.h +F: subprojects/libvhost-user/ =20 virtio M: Michael S. Tsirkin --=20 2.35.1 From nobody Sun May 5 09:56:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1669476399; cv=none; d=zohomail.com; s=zohoarc; b=TgUgQVaVJD8kQ7TRfcTULf/BmdIrn2I5QTYTkBNZSlGVNIqzhpgZry+SMSt+9ySW/eo19ts0qCEOJgKzlrCjWsoZnPqtvZSYr8xyK8KxzWjKghb2dDXAY2+LqVJQdJb9YTqNJ8bC88PD5jk3nYikcnM+JnWNzwYVv8AL7r6FIJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669476399; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=iI5i7roEaxvhg0pKqhDfnQpmVCVuYlaEagkwDtGSsvo=; b=m3Meo2kv6liRmTtieEdbqxGSCkfLuaBOOGh2fvpEiMzvAXRYWruG+TPt88xhQ9Uyrvmop5UGWFp/Cbm1FPoNp+0VoCTIIohmtTzWZcItF5rMpgsunAZtj3y54UewmIbOWRLavENe8A8gtCu9sc0/3jBk03MEO451jgmDQJLHyxg= ARC-Authentication-Results: i=1; mx.zohomail.com; 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1669476399888206.65652436655944; Sat, 26 Nov 2022 07:26:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyx41-0008VN-MT; Sat, 26 Nov 2022 10:25:57 -0500 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 1oyx3w-0008SB-T6 for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:52 -0500 Received: from mail.weilnetz.de ([37.120.169.71] helo=mail.v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyx3v-0006ut-9O for qemu-devel@nongnu.org; Sat, 26 Nov 2022 10:25:52 -0500 Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by mail.v2201612906741603.powersrv.de (Postfix) with ESMTP id 2561ADA16F8; Sat, 26 Nov 2022 16:25:50 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id 227D146000E; Sat, 26 Nov 2022 16:25:50 +0100 (CET) To: qemu-devel@nongnu.org, "Michael S . Tsirkin" Cc: Stefan Hajnoczi , Laurent Vivier , Stefan Weil , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 for-7.2 6/6] Add G_GNUC_PRINTF to function qemu_set_info_str and fix related issues Date: Sat, 26 Nov 2022 16:25:07 +0100 Message-Id: <20221126152507.283271-7-sw@weilnetz.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221126152507.283271-1-sw@weilnetz.de> References: <20221126152507.283271-1-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=37.120.169.71; envelope-from=stefan@weilnetz.de; helo=mail.v2201612906741603.powersrv.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=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: , Reply-to: Stefan Weil From: Stefan Weil via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1669476401015100001 With the G_GNUC_PRINTF function attribute the compiler detects two potential insecure format strings: ../../../net/stream.c:248:31: warning: format string is not a string litera= l (potentially insecure) [-Wformat-security] qemu_set_info_str(&s->nc, uri); ^~~ ../../../net/stream.c:322:31: warning: format string is not a string litera= l (potentially insecure) [-Wformat-security] qemu_set_info_str(&s->nc, uri); ^~~ There are also two other warnings: ../../../net/socket.c:182:35: warning: zero-length gnu_printf format string= [-Wformat-zero-length] 182 | qemu_set_info_str(&s->nc, ""); | ^~ ../../../net/stream.c:170:35: warning: zero-length gnu_printf format string= [-Wformat-zero-length] 170 | qemu_set_info_str(&s->nc, ""); Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Stefan Weil Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- include/net/net.h | 3 ++- net/socket.c | 2 +- net/stream.c | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 3db75ff841..dc20b31e9f 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -177,7 +177,8 @@ ssize_t qemu_send_packet_async(NetClientState *nc, cons= t uint8_t *buf, void qemu_purge_queued_packets(NetClientState *nc); void qemu_flush_queued_packets(NetClientState *nc); void qemu_flush_or_purge_queued_packets(NetClientState *nc, bool purge); -void qemu_set_info_str(NetClientState *nc, const char *fmt, ...); +void qemu_set_info_str(NetClientState *nc, + const char *fmt, ...) G_GNUC_PRINTF(2, 3); void qemu_format_nic_info_str(NetClientState *nc, uint8_t macaddr[6]); bool qemu_has_ufo(NetClientState *nc); bool qemu_has_vnet_hdr(NetClientState *nc); diff --git a/net/socket.c b/net/socket.c index 4944bb70d5..e62137c839 100644 --- a/net/socket.c +++ b/net/socket.c @@ -179,7 +179,7 @@ static void net_socket_send(void *opaque) s->fd =3D -1; net_socket_rs_init(&s->rs, net_socket_rs_finalize, false); s->nc.link_down =3D true; - qemu_set_info_str(&s->nc, ""); + qemu_set_info_str(&s->nc, "%s", ""); =20 return; } diff --git a/net/stream.c b/net/stream.c index 53b7040cc4..37ff727e0c 100644 --- a/net/stream.c +++ b/net/stream.c @@ -167,7 +167,7 @@ static gboolean net_stream_send(QIOChannel *ioc, =20 net_socket_rs_init(&s->rs, net_stream_rs_finalize, false); s->nc.link_down =3D true; - qemu_set_info_str(&s->nc, ""); + qemu_set_info_str(&s->nc, "%s", ""); =20 qapi_event_send_netdev_stream_disconnected(s->nc.name); =20 @@ -245,7 +245,7 @@ static void net_stream_listen(QIONetListener *listener, } g_assert(addr !=3D NULL); uri =3D socket_uri(addr); - qemu_set_info_str(&s->nc, uri); + qemu_set_info_str(&s->nc, "%s", uri); g_free(uri); qapi_event_send_netdev_stream_connected(s->nc.name, addr); qapi_free_SocketAddress(addr); @@ -319,7 +319,7 @@ static void net_stream_client_connected(QIOTask *task, = gpointer opaque) addr =3D qio_channel_socket_get_remote_address(sioc, NULL); g_assert(addr !=3D NULL); uri =3D socket_uri(addr); - qemu_set_info_str(&s->nc, uri); + qemu_set_info_str(&s->nc, "%s", uri); g_free(uri); =20 ret =3D qemu_socket_try_set_nonblock(sioc->fd); --=20 2.35.1