From nobody Sun May 19 13:54:33 2024 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=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659447604; cv=none; d=zohomail.com; s=zohoarc; b=jH/dtAhZ6pNQ7nN/ovDv+77LERK0C/y7mjSP2rQ/26i5lhr/cG24pY/23GHdq5afidXdC/eOHHYhr7r3NW2B/WUT1L9mtMBsbsqmTuFIo/aCQ5vF9YFEGtqjW1CYoVYt1uBZoiA5wNP9l/Wu2EMRPmEXy4jpgbt+7+1xSPTRA5M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659447604; 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:References:Sender:Subject:To; bh=vSCc8JrQwHHwaeq4p87pF8gldcnzauUQUjvusAVhgnA=; b=C7b4J8OGP5krLZEX0g8II9wSKZ3BP3dUnoyYBucF6Pv9nx6bG27tkfRe+bxpoN1r2sGyivO3QI5EqIu1HlMFSY9/sQ8Pnn0HZLIYlP6Yt8ulo9AT7/1qGJX2W4TTgy4xLST+hrGvps6Q/88IjIp5AtWTEFuVcXmXBR68bIor+YA= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659447604170485.71600648722574; Tue, 2 Aug 2022 06:40:04 -0700 (PDT) Received: from localhost ([::1]:46998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIs7v-0006Ri-5Z for importer@patchew.org; Tue, 02 Aug 2022 09:40:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs66-0003aL-R3 for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:24340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs63-0002aM-AK for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:09 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-459-eoMgy9OTNqCGBeOPLr1yCg-1; Tue, 02 Aug 2022 09:38:03 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 197DF280D211; Tue, 2 Aug 2022 13:38:03 +0000 (UTC) Received: from merkur.redhat.com (unknown [10.39.194.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 598E22166B2A; Tue, 2 Aug 2022 13:38:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659447486; 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=vSCc8JrQwHHwaeq4p87pF8gldcnzauUQUjvusAVhgnA=; b=KlNza/QhJBYKyWSLIeajU2enL/X22ntRa5C0HaKZOi2itUwsSDbUG/opH1QL57kgo4ZWem UD3NFSjj8xyUIuSR/8EApgNIcoZgzLORdrw3nINLu3DeVMfrcEb0xPdUAS0DOcnbJ/P1gX NojqbMXovdfoGYXAsDGhhmAby7Hj7dM= X-MC-Unique: eoMgy9OTNqCGBeOPLr1yCg-1 From: Kevin Wolf To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [PULL 1/7] block/io_uring: add missing include file Date: Tue, 2 Aug 2022 15:37:51 +0200 Message-Id: <20220802133757.138016-2-kwolf@redhat.com> In-Reply-To: <20220802133757.138016-1-kwolf@redhat.com> References: <20220802133757.138016-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659447605909100001 From: Jinhao Fan The commit "Use io_uring_register_ring_fd() to skip fd operations" uses warn_report but did not include the header file "qemu/error-report.h". This causes "error: implicit declaration of function =E2=80=98warn_report= =E2=80=99". Include this header file. Fixes: e2848bc574 ("Use io_uring_register_ring_fd() to skip fd operations") Signed-off-by: Jinhao Fan Message-Id: <20220721065645.577404-1-fanjinhao21s@ict.ac.cn> Reviewed-by: Stefano Garzarella Signed-off-by: Kevin Wolf --- block/io_uring.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/io_uring.c b/block/io_uring.c index f8a19fd97f..a1760152e0 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include #include "block/aio.h" +#include "qemu/error-report.h" #include "qemu/queue.h" #include "block/block.h" #include "block/raw-aio.h" --=20 2.35.3 From nobody Sun May 19 13:54:33 2024 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=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659447808; cv=none; d=zohomail.com; s=zohoarc; b=GH16mbSnGWJOe9zfgrTT/OUU5N1YnzrTkU8pVaMX5XLtsCVSJfEBudyEuzBd4Q/Pjv/ThDva56iNuEx7C3XxS4IdiArByW2QOQeYePYkURK5EXBh+2Dcygo3tpSOpGbpC2t2mwt72R4boPBmBFjFpS2MPUqjH1Hv/zCimXuhZoI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659447808; 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:References:Sender:Subject:To; bh=8s0xXFthbNdHiX3aLnACAnZtp3l56TbrxVaf8KuEF6k=; b=kWdtV57+6wPWAcVAtnhe/VhI6AVVUM+J/w7PV6+4uHEvGnQs+f1zohT7CHvvHLPcq94A7Q92HU2t2DK64pmInS2y0ATZ9djN+TnmtbRMlTZ1lt9TBT3c5SSJFAI/7nCwEdaz8KQJ/i+c0mqdLBbQDiL1KO7MAVAHZj4SfzD3Fbk= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659447808677894.6941114051768; Tue, 2 Aug 2022 06:43:28 -0700 (PDT) Received: from localhost ([::1]:56604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIsBC-0004en-Go for importer@patchew.org; Tue, 02 Aug 2022 09:43:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs64-0003Xz-Pg for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs63-0002a5-1A for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:08 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-250-z7CufGorN0Shx1MpCZZKLQ-1; Tue, 02 Aug 2022 09:38:04 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0AB2685A586; Tue, 2 Aug 2022 13:38:04 +0000 (UTC) Received: from merkur.redhat.com (unknown [10.39.194.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 56F4C2166B26; Tue, 2 Aug 2022 13:38:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659447485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8s0xXFthbNdHiX3aLnACAnZtp3l56TbrxVaf8KuEF6k=; b=GBFxVAFFBhlXvshA+fsrNydG5sDkLK06WSfrTXodVTcSz4z6kgOBuYxMZiszVOfbRiEqJd Muc/qGZhDAS7j2jLjbdgs9a+P0+8GHdyHeLp/Pk18VhYkM0tVkr0ToNSLasJSsOph2bLqy gcg0bdafHhHHsz7J4Hi5UtxXtwkuZd8= X-MC-Unique: z7CufGorN0Shx1MpCZZKLQ-1 From: Kevin Wolf To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [PULL 2/7] libvduse: Fix the incorrect function name Date: Tue, 2 Aug 2022 15:37:52 +0200 Message-Id: <20220802133757.138016-3-kwolf@redhat.com> In-Reply-To: <20220802133757.138016-1-kwolf@redhat.com> References: <20220802133757.138016-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659447809475100001 Content-Type: text/plain; charset="utf-8" From: Xie Yongji In vduse_name_is_valid(), we actually check whether the name is invalid or not. So let's change the function name to vduse_name_is_invalid() to match the behavior. Signed-off-by: Xie Yongji Reviewed-by: Markus Armbruster Message-Id: <20220706095624.328-2-xieyongji@bytedance.com> Signed-off-by: Kevin Wolf --- subprojects/libvduse/libvduse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvdus= e.c index 9a2bcec282..6374933881 100644 --- a/subprojects/libvduse/libvduse.c +++ b/subprojects/libvduse/libvduse.c @@ -1193,7 +1193,7 @@ static int vduse_dev_init(VduseDev *dev, const char *= name, return 0; } =20 -static inline bool vduse_name_is_valid(const char *name) +static inline bool vduse_name_is_invalid(const char *name) { return strlen(name) >=3D VDUSE_NAME_MAX || strstr(name, ".."); } @@ -1242,7 +1242,7 @@ VduseDev *vduse_dev_create_by_name(const char *name, = uint16_t num_queues, VduseDev *dev; int ret; =20 - if (!name || vduse_name_is_valid(name) || !ops || + if (!name || vduse_name_is_invalid(name) || !ops || !ops->enable_queue || !ops->disable_queue) { fprintf(stderr, "Invalid parameter for vduse\n"); return NULL; @@ -1276,7 +1276,7 @@ VduseDev *vduse_dev_create(const char *name, uint32_t= device_id, struct vduse_dev_config *dev_config; size_t size =3D offsetof(struct vduse_dev_config, config); =20 - if (!name || vduse_name_is_valid(name) || + if (!name || vduse_name_is_invalid(name) || !has_feature(features, VIRTIO_F_VERSION_1) || !config || !config_size || !ops || !ops->enable_queue || !ops->disable_queue)= { fprintf(stderr, "Invalid parameter for vduse\n"); --=20 2.35.3 From nobody Sun May 19 13:54:33 2024 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=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659447937; cv=none; d=zohomail.com; s=zohoarc; b=Kp6hI97FUitU7CWYF8F9+XC+lSyva/lGgs00uZIXClo5cdXaoiZB+qH6qDJFyUigYRzG/Jzbkm5Jd/jSDw0YGX+hml8pOv5pFxs8cxkAsT8+pmb1q5msaHoAhQQ0M04FO41yYPOejjJLxvbg774lCSFkBhA8ikZV8OJ+rr+CFmA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659447937; 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:References:Sender:Subject:To; bh=AFPrwYhk7XoJbqRc6nAUA+SaC++OjEGxIi419e5RF74=; b=Z/rWwIKeaBjlCZzgoGfEyjDZoro1PtfgAjnOTXCQr2J1l6wj/MELhKVFbcesFypuR2T2jcwLQIp8rK2JBKUyW0NMgVQi6fGwIqfovay2hoFhQED+3J5K3VM28pPHtf6QFC/pzQaDj23IdnUOaIxMcqEJMJ7Z/63PogHmMSC4+Tk= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659447937637680.5199552188866; Tue, 2 Aug 2022 06:45:37 -0700 (PDT) Received: from localhost ([::1]:60116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIsDI-00071z-9J for importer@patchew.org; Tue, 02 Aug 2022 09:45:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs66-0003a5-T1 for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:59984) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs63-0002aH-3V for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:09 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-507-r1viZMa-MguoK87l5fXAPA-1; Tue, 02 Aug 2022 09:38:05 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 07F2E101E986; Tue, 2 Aug 2022 13:38:05 +0000 (UTC) Received: from merkur.redhat.com (unknown [10.39.194.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 50A622166B26; Tue, 2 Aug 2022 13:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659447486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AFPrwYhk7XoJbqRc6nAUA+SaC++OjEGxIi419e5RF74=; b=NKKce3d6f3BY2wYfeHVQeBL4639bt5wSTowk8o7yn0sShQ19uONpLSbDn4JQKB54dZWmIW IJmZOJ5EEZcdR7VC+sLVONP+mXTMjRyueLYugffDx5meP+0mmh0BU6yHev+P0jYO94Ashx MWQqf2Eb/apxZd3L5+T4M8YF/hWHjLc= X-MC-Unique: r1viZMa-MguoK87l5fXAPA-1 From: Kevin Wolf To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [PULL 3/7] libvduse: Replace strcpy() with strncpy() Date: Tue, 2 Aug 2022 15:37:53 +0200 Message-Id: <20220802133757.138016-4-kwolf@redhat.com> In-Reply-To: <20220802133757.138016-1-kwolf@redhat.com> References: <20220802133757.138016-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659447939486100001 Content-Type: text/plain; charset="utf-8" From: Xie Yongji Coverity reported a string overflow issue since we copied "name" to "dev_config->name" without checking the length. This should be a false positive since we already checked the length of "name" in vduse_name_is_invalid(). But anyway, let's replace strcpy() with strncpy() (as a general library, we'd like to minimize dependencies on other libraries, so we didn't use g_strlcpy() here) to fix the coverity complaint. Fixes: Coverity CID 1490224 Signed-off-by: Xie Yongji Reviewed-by: Markus Armbruster Message-Id: <20220706095624.328-3-xieyongji@bytedance.com> Signed-off-by: Kevin Wolf --- subprojects/libvduse/libvduse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvdus= e.c index 6374933881..1e36227388 100644 --- a/subprojects/libvduse/libvduse.c +++ b/subprojects/libvduse/libvduse.c @@ -1309,7 +1309,8 @@ VduseDev *vduse_dev_create(const char *name, uint32_t= device_id, goto err_dev; } =20 - strcpy(dev_config->name, name); + strncpy(dev_config->name, name, VDUSE_NAME_MAX); + dev_config->name[VDUSE_NAME_MAX - 1] =3D '\0'; dev_config->device_id =3D device_id; dev_config->vendor_id =3D vendor_id; dev_config->features =3D features; --=20 2.35.3 From nobody Sun May 19 13:54:33 2024 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=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659447618; cv=none; d=zohomail.com; s=zohoarc; b=b98m9FtZT8IXnOyNB4yFI6vhpMCcZOgpuE0/PDDaWpjpyVEiYL6vkzzrWl+8xLfOqvypLqcuWmtDtwTZAWGRbEGjvJMjWdsB8WbXceqZrWMh90kdWdVqHMBY3Pxy1HGmPShFUKDMjs9gTzRFUIq9xCAtC/c8/28yGoO1e0o6eTY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659447618; 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:References:Sender:Subject:To; bh=Cyh/bcdfGlkXJJRAyRmxxlHOnTTmQ4pLigrB+Y2aoPs=; b=JZoE004dy5ll8gOXV87F6/4OQbKn0aMCsVJ3plCe6SRFS9Xa+aMNgXQerEX2hVrsN/+i8KMwdgjf5PPvFgQiP2z0/qdJAug9ekc85l05ccX22yGyaQDNj574fvdQmrZWHXj3wmTvzttmAOSd76t9FK//lmvVdQqBQzwrdxs31po= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659447618719963.9568692862637; Tue, 2 Aug 2022 06:40:18 -0700 (PDT) Received: from localhost ([::1]:47816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIs89-00070r-Ny for importer@patchew.org; Tue, 02 Aug 2022 09:40:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs66-0003b8-6h for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:20161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs64-0002ar-5s for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:09 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-434-8TPEq9qRN6mlgnlSK1ERWQ-1; Tue, 02 Aug 2022 09:38:06 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EF01F1C08963; Tue, 2 Aug 2022 13:38:05 +0000 (UTC) Received: from merkur.redhat.com (unknown [10.39.194.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 484002166B26; Tue, 2 Aug 2022 13:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659447487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cyh/bcdfGlkXJJRAyRmxxlHOnTTmQ4pLigrB+Y2aoPs=; b=DfoQuQgLh8CUgPkssfdZ2uNja+vYkUMr2TWSHW/8o6LRoN6LGg0XTJIz9UIQV+R3g9aW7B D6QwGc1tHgUlORfDxjSRwAngk0jfSndafBo+GSc/1XQ6AXOrkuuddrwisDxPaFwyHf9+J7 Brg6HGlSR47YJxW2/N4/+1+7nHfQ2xE= X-MC-Unique: 8TPEq9qRN6mlgnlSK1ERWQ-1 From: Kevin Wolf To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [PULL 4/7] libvduse: Pass positive value to strerror() Date: Tue, 2 Aug 2022 15:37:54 +0200 Message-Id: <20220802133757.138016-5-kwolf@redhat.com> In-Reply-To: <20220802133757.138016-1-kwolf@redhat.com> References: <20220802133757.138016-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659447620019100001 Content-Type: text/plain; charset="utf-8" From: Xie Yongji The value passed to strerror() should be positive. So let's fix it. Fixes: Coverity CID 1490226, 1490223 Signed-off-by: Xie Yongji Reviewed-by: Richard Henderson Reviewed-by: Markus Armbruster Message-Id: <20220706095624.328-4-xieyongji@bytedance.com> Signed-off-by: Kevin Wolf --- subprojects/libvduse/libvduse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvdus= e.c index 1e36227388..1a5981445c 100644 --- a/subprojects/libvduse/libvduse.c +++ b/subprojects/libvduse/libvduse.c @@ -1257,7 +1257,7 @@ VduseDev *vduse_dev_create_by_name(const char *name, = uint16_t num_queues, ret =3D vduse_dev_init(dev, name, num_queues, ops, priv); if (ret < 0) { fprintf(stderr, "Failed to init vduse device %s: %s\n", - name, strerror(ret)); + name, strerror(-ret)); free(dev); return NULL; } @@ -1331,7 +1331,7 @@ VduseDev *vduse_dev_create(const char *name, uint32_t= device_id, ret =3D vduse_dev_init(dev, name, num_queues, ops, priv); if (ret < 0) { fprintf(stderr, "Failed to init vduse device %s: %s\n", - name, strerror(ret)); + name, strerror(-ret)); goto err; } =20 --=20 2.35.3 From nobody Sun May 19 13:54:33 2024 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=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659447781; cv=none; d=zohomail.com; s=zohoarc; b=m12uIM6AMz4MhqubbkkfgMlA/qPZa18cDQ3EW8QhRjyUi/yd8H+cg7dywCgkxyvyTO2+0xu/9SU+lF0zFO8qL87KF8cXsiWgq3wjcUj+SrsZ+KTH8/rUDw7O7TjvVoeuihjXLiyxkJJDVUEVwlxwowHuAJAXeDFCx5MIA06IH4I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659447781; 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:References:Sender:Subject:To; bh=2IcXm2h1OLjaX+Qr7URbmt3haEdF1o8m6pzbGWZXudU=; b=FiURJE4Api5cu8glCIQLgtA788zBzzLHK4AfTDhO9Efwym8vTeQPe7YF+ista9ALlaRstp+7XxLHiHTgJPDTZZ3GlWUF1gXu6JLkO8ayI7aMyjY8m6fPUvCzcI9wtVWH6x6NvhiVPwuqWWw/QXY54LqTd1/y1IXx8MVj+IyUO5c= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659447781611929.8116111510524; Tue, 2 Aug 2022 06:43:01 -0700 (PDT) Received: from localhost ([::1]:55274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIsAl-0003l5-6h for importer@patchew.org; Tue, 02 Aug 2022 09:42:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs69-0003fR-DO for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:50213) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs67-0002cN-HW for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:13 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-197-7MvS9m8sNYOIGtpf1V3Bbw-1; Tue, 02 Aug 2022 09:38:07 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E4F08280D209; Tue, 2 Aug 2022 13:38:06 +0000 (UTC) Received: from merkur.redhat.com (unknown [10.39.194.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 39B4E2166B26; Tue, 2 Aug 2022 13:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659447490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2IcXm2h1OLjaX+Qr7URbmt3haEdF1o8m6pzbGWZXudU=; b=ELVXwEqmBDccDOuPofExN9ShXAvXjI/gWt8P16FJI4c7R+H2KnLNEtmpc5HyAuaoj9NmTV dWbZFw4fP/U+MzzztiHLTIvxBzAss5yjqblXSVsdcgGEtwEfGmAnIY2LXjWDS84bbYJPap 8iwZXfj7BwS2Ebe+bpq3/+vXCkQoezI= X-MC-Unique: 7MvS9m8sNYOIGtpf1V3Bbw-1 From: Kevin Wolf To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [PULL 5/7] hw/block/hd-geometry: Do not override specified bios-chs-trans Date: Tue, 2 Aug 2022 15:37:55 +0200 Message-Id: <20220802133757.138016-6-kwolf@redhat.com> In-Reply-To: <20220802133757.138016-1-kwolf@redhat.com> References: <20220802133757.138016-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659447783258100001 Content-Type: text/plain; charset="utf-8" From: Lev Kujawski For small disk images (<4 GiB), QEMU and SeaBIOS default to the LARGE/ECHS disk translation method, but it is not uncommon for other BIOS software to use LBA in these cases as well. Some operating system boot loaders (e.g., NT 4) do not handle LARGE translations outside of fixed configurations. See, e.g., Q154052: "When starting an x86 based computer, Ntdetect.com retrieves and stores Interrupt 13 information. . . If the disk controller is using a 32 sector/64 head translation scheme, this boundary will be 1 GB. If the controller uses 63 sector/255 head translation [AUTHOR: i.e., LBA], the limit will be 4 GB." To accommodate these situations, hd_geometry_guess() now follows the disk translation specified by the user even when the ATA disk geometry is guessed. hd_geometry_guess(): * Only set the disk translation when translation is AUTO. * Show the soon-to-be active translation (*ptrans) in the trace rather than what was guessed. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/56 Buglink: https://bugs.launchpad.net/qemu/+bug/1745312 Signed-off-by: Lev Kujawski Message-Id: <20220707204045.999544-1-lkujaw@member.fsf.org> Signed-off-by: Kevin Wolf --- hw/block/hd-geometry.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/block/hd-geometry.c b/hw/block/hd-geometry.c index 112094358e..dae13ab14d 100644 --- a/hw/block/hd-geometry.c +++ b/hw/block/hd-geometry.c @@ -150,7 +150,12 @@ void hd_geometry_guess(BlockBackend *blk, translation =3D BIOS_ATA_TRANSLATION_NONE; } if (ptrans) { - *ptrans =3D translation; + if (*ptrans =3D=3D BIOS_ATA_TRANSLATION_AUTO) { + *ptrans =3D translation; + } else { + /* Defer to the translation specified by the user. */ + translation =3D *ptrans; + } } trace_hd_geometry_guess(blk, *pcyls, *pheads, *psecs, translation); } --=20 2.35.3 From nobody Sun May 19 13:54:33 2024 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=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659448272; cv=none; d=zohomail.com; s=zohoarc; b=ea7maDQ6XdZWvvJP2RUvj6LRqL0VhtTctoALTOoGUl/FCP9K/zKlH6F1K69ZGRrt7X8nyQSGp/HFo9HNYBfnvIw+7J+yD7pxLQ+f+2bdm7qHQdZtA54TF0CYAh5Sl26a/bYwKiwycSidu4M+mB3xK4vKOiDktiw49q1XJSpIW/g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659448272; 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:References:Sender:Subject:To; bh=HUo0lfirg8QU102T4uNn5N84cH1z8mhvI8+mQFvddCA=; b=e+FNcpaeMpAlvL/08cvilUVCuvjap2M2fYpmQA44a8CD8BBq7ZK0SFzgwXCwd6+oAxrly8IVS+vcjwzHHBQTWZ3Vca4GZuS26F2K1P4+RnrfgOnc2CC8wnm208Xrpn8lXVMa6tJlJFliWhphwAH63hRsb3DJWv4CmenlNzOCNds= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659448272411436.9881070346653; Tue, 2 Aug 2022 06:51:12 -0700 (PDT) Received: from localhost ([::1]:37568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIsIh-0002rT-8d for importer@patchew.org; Tue, 02 Aug 2022 09:51:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs69-0003fT-Mp for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs67-0002dO-Uv for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:13 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-412-wMCpBJ3sNjGqiHE-B0LFDA-1; Tue, 02 Aug 2022 09:38:08 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DDD1C85A581; Tue, 2 Aug 2022 13:38:07 +0000 (UTC) Received: from merkur.redhat.com (unknown [10.39.194.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F01D2166B26; Tue, 2 Aug 2022 13:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659447491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HUo0lfirg8QU102T4uNn5N84cH1z8mhvI8+mQFvddCA=; b=cHdLggO/m2FH4XqDmhBcFaYlbV+mH3BIsxAKb6XWhUqZ1OazcPo2gLYqwmoYA97lPfjIOm IkdJFzxuFl4xWvIzQ9n8TZisUGxBEptyWQdOXBzpS++vFjAkqISWvF/LLwTYZK7xgFckqs yhsMCaebtPHFGgibAMgR8ZZJYk79/CI= X-MC-Unique: wMCpBJ3sNjGqiHE-B0LFDA-1 From: Kevin Wolf To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [PULL 6/7] qemu-iotests: Discard stderr when probing devices Date: Tue, 2 Aug 2022 15:37:56 +0200 Message-Id: <20220802133757.138016-7-kwolf@redhat.com> In-Reply-To: <20220802133757.138016-1-kwolf@redhat.com> References: <20220802133757.138016-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659448273817100001 Content-Type: text/plain; charset="utf-8" From: Cole Robinson qemu-iotests fails in the following setup: ./configure --enable-modules --enable-smartcard \ --target-list=3Dx86_64-softmmu,s390x-softmmu make cd build QEMU_PROG=3D`pwd`/s390x-softmmu/qemu-system-s390x \ ../tests/check-block.sh qcow2 ... --- /home/crobinso/src/qemu/tests/qemu-iotests/127.out +++ /home/crobinso/src/qemu/build/tests/qemu-iotests/scratch/127.out.bad @@ -1,4 +1,18 @@ QA output created by 127 +Failed to open module: /home/crobinso/src/qemu/build/hw-usb-smartcard.so= : undefined symbol: ccid_card_ccid_attach ... --- /home/crobinso/src/qemu/tests/qemu-iotests/267.out +++ /home/crobinso/src/qemu/build/tests/qemu-iotests/scratch/267.out.bad @@ -1,4 +1,11 @@ QA output created by 267 +Failed to open module: /home/crobinso/src/qemu/build/hw-usb-smartcard.so= : undefined symbol: ccid_card_ccid_attach The stderr spew is its own known issue, but seems like iotests should be discarding stderr in this case. Signed-off-by: Cole Robinson Reviewed-by: Thomas Huth Signed-off-by: Kevin Wolf --- tests/qemu-iotests/common.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 165b54a61e..db757025cb 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -982,7 +982,7 @@ _require_large_file() # _require_devices() { - available=3D$($QEMU -M none -device help | \ + available=3D$($QEMU -M none -device help 2> /dev/null | \ grep ^name | sed -e 's/^name "//' -e 's/".*$//') for device do @@ -994,7 +994,7 @@ _require_devices() =20 _require_one_device_of() { - available=3D$($QEMU -M none -device help | \ + available=3D$($QEMU -M none -device help 2> /dev/null | \ grep ^name | sed -e 's/^name "//' -e 's/".*$//') for device do --=20 2.35.3 From nobody Sun May 19 13:54:33 2024 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=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659448433; cv=none; d=zohomail.com; s=zohoarc; b=Sfw1zUOJodWrq7uV+RujFo3o+Pi2QTd2u/xuRLJDbHyFfyIH+umf5nDilE0VuHC+GkLYY8E7KQwZmNi8rSnhNwe4n4CyfRUdPEdRalkNnFKj8ymxMfV0YZCdCRuMoIAx47Ab44s91IapGvqq4gWe9lXSis/6qT2vXBzZTBfP75s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659448433; 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:References:Sender:Subject:To; bh=RKLB1zn4KzIvFXNRcX/kMzg32O3R5iZJUQDpAHKsDxk=; b=lBWLsKPjBG42zNC77CCTXDcSjzxIO7HnlFK2nM0jiWpeJhRkZ/QLXEqIA/hfT02KRQj0toxYspsemrfv5IwLbkkjpMMBrm2t3tGgFMXwqWmQwagLQMPfzlSwIrVxeZpdAJZNWdGGHOxEHd+y0QXJByVJd/APPbupwYBuxD4r6K8= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659448433608226.2244268434755; Tue, 2 Aug 2022 06:53:53 -0700 (PDT) Received: from localhost ([::1]:42732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIsLI-0006Xl-KI for importer@patchew.org; Tue, 02 Aug 2022 09:53:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs69-0003fQ-7s for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:43895) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIs67-0002c9-HF for qemu-devel@nongnu.org; Tue, 02 Aug 2022 09:38:12 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-569-gIZUC_aIOuK6-iiN4wJX4w-1; Tue, 02 Aug 2022 09:38:09 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D9C961C08967; Tue, 2 Aug 2022 13:38:08 +0000 (UTC) Received: from merkur.redhat.com (unknown [10.39.194.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 29E742166B26; Tue, 2 Aug 2022 13:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659447490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RKLB1zn4KzIvFXNRcX/kMzg32O3R5iZJUQDpAHKsDxk=; b=VJDolWqLfl0JQbdaMs55i6NJuh1YwIzpUkaQiE/UoSdFTF0xSC4nUIwQZ9XjBY9IwvQFtL 0mHpEH+DZqiyYKHZ5SSEKbPip4ycuEYyHVSZD9s8OkemrbrwsL10bXqs3/h33Q8tFbM9D2 dNyz1lXrFFUBESQ8n21XoGabha6/XV4= X-MC-Unique: gIZUC_aIOuK6-iiN4wJX4w-1 From: Kevin Wolf To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [PULL 7/7] main loop: add missing documentation links to GS/IO macros Date: Tue, 2 Aug 2022 15:37:57 +0200 Message-Id: <20220802133757.138016-8-kwolf@redhat.com> In-Reply-To: <20220802133757.138016-1-kwolf@redhat.com> References: <20220802133757.138016-1-kwolf@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=kwolf@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, 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_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659448434777100001 Content-Type: text/plain; charset="utf-8" From: Emanuele Giuseppe Esposito If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE definition, we just find that they "mark and check that the function is part of the {category} API". However, ther is no definition on what {category} API is, they are in include/block/block-*.h Therefore, add a comment that refers to such documentation. Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <20220609122206.1016936-1-eesposit@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- include/qemu/main-loop.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 5518845299..c50d1b7e3a 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -279,7 +279,11 @@ bool qemu_mutex_iothread_locked(void); */ bool qemu_in_main_thread(void); =20 -/* Mark and check that the function is part of the global state API. */ +/* + * Mark and check that the function is part of the Global State API. + * Please refer to include/block/block-global-state.h for more + * information about GS API. + */ #ifdef CONFIG_COCOA /* * When using the Cocoa UI, addRemovableDevicesMenuItems() is called from @@ -298,13 +302,21 @@ bool qemu_in_main_thread(void); } while (0) #endif /* CONFIG_COCOA */ =20 -/* Mark and check that the function is part of the I/O API. */ +/* + * Mark and check that the function is part of the I/O API. + * Please refer to include/block/block-io.h for more + * information about IO API. + */ #define IO_CODE() \ do { \ /* nop */ \ } while (0) =20 -/* Mark and check that the function is part of the "I/O OR GS" API. */ +/* + * Mark and check that the function is part of the "I/O OR GS" API. + * Please refer to include/block/block-io.h for more + * information about "IO or GS" API. + */ #define IO_OR_GS_CODE() \ do { \ /* nop */ \ --=20 2.35.3