From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA391A0540 for ; Thu, 7 Jul 2022 09:58:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D5544406B4; Thu, 7 Jul 2022 09:58:06 +0200 (CEST) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 366EA415D7 for ; Thu, 7 Jul 2022 09:58:06 +0200 (CEST) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (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 smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id DF7B83F1FD for ; Thu, 7 Jul 2022 07:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180685; bh=rR6K2CI+qzX9l11Ay+97iBgIzTlEeCf0bW5tCXY+ukQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=jEpzRo2BFOcDvfGPUjnSgfbwxKl+X6wmUeom8K1fP8gBWLmWEPCt5Ghi2OtWJIWFx OlvPUsElSPsPy9WK3nyF8UKYNCJrMNkdCcdF9zT+5UtAD2ICcuLZ22YuPN9f5BQqgW neeAEVBPI8D7wbmX6NhlYAlUGnGBrqdz6ety+LPKvcMcJyMdIkeTBgVagOp2+G4ThP 6RybGDv+gHNakTrwtc/RbILq2Mop14xBZvOOsixKTfNkYHyKY2pHJlGJcxwR99F0EP BYSgTDy80WXFCHV5MvaSY4dIshoQcPEebyfPZIND26d+2h0kQv1yzT+uYO1KFA4Vb8 o22RIF0wF/iXg== Received: by mail-ed1-f72.google.com with SMTP id z13-20020a056402274d00b004357fcdd51fso13333286edd.17 for ; Thu, 07 Jul 2022 00:58:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rR6K2CI+qzX9l11Ay+97iBgIzTlEeCf0bW5tCXY+ukQ=; b=fkb2RafDRi+2SC55z0oRPpCxoX2Zo8+XgrYCh8S+3EYVTR3YQbu8pY6XK7Xq0vcvP2 Gjcy4xZpCY54oOTWzkN/yR4XmldZuOyXk603obgOYMTmLJRX7Xs8KJ2WdQYbKPqh06tP EVtJ7S0K6c1R6h3anzWt/6Zw5cFHhppJ7YIPZKWgozAkpRcw+R9b5b8pBf/SthpztMyg NS4/VxCNBpp1NoCrHI0P9isiXOtcndBffyjInQK8El8YIBwGYi3nO1bVbFNKuPIC0aFH WljQSXmid9rrJlzSwUpggcoW7S/y/kUkBiOrpuZyTSt0R06ICNAtGd57hBp6ITMygye9 JECQ== X-Gm-Message-State: AJIora+LoiJPe5u6Qmgr+6e48/WX60uI7x03wr2e0TA4ZujQ7JXq+EYd hVuS9eVo9He8BOB4ff92+78gJFtjpiIZFxEqn02lbvpONgOS6HFPwmtNFYnJm2AavI9FU1e8mYQ 1LoKX1Hp/UmqpFvoJqK0EI2CT X-Received: by 2002:a05:6402:42c3:b0:43a:46f6:ebd2 with SMTP id i3-20020a05640242c300b0043a46f6ebd2mr30172137edc.213.1657180685621; Thu, 07 Jul 2022 00:58:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uwWraUEo52Nib9F1WO54Mf5UsMso0/xepD++SfAsOI1gmBcejwy1FRzcijFvF+kXYUYSLacg== X-Received: by 2002:a05:6402:42c3:b0:43a:46f6:ebd2 with SMTP id i3-20020a05640242c300b0043a46f6ebd2mr30172114edc.213.1657180685381; Thu, 07 Jul 2022 00:58:05 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id q21-20020aa7cc15000000b0042617ba638esm27392052edt.24.2022.07.07.00.58.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:58:04 -0700 (PDT) From: christian.ehrhardt@canonical.com To: David Marchand Cc: Xiao Wang , Stephen Hemminger , dpdk stable Subject: patch 'vdpa/ifc: fix build with GCC 12' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:49 +0200 Message-Id: <20220707075522.194223-54-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 19.11.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/777f8832c69c86d8e1d96c6a97dd6e5596f3763f Thanks. Christian Ehrhardt --- >From 777f8832c69c86d8e1d96c6a97dd6e5596f3763f Mon Sep 17 00:00:00 2001 From: David Marchand Date: Wed, 18 May 2022 12:16:54 +0200 Subject: [PATCH] vdpa/ifc: fix build with GCC 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 2a213b794fdd255fde7581a7c9bd034ab39e9b6a ] GCC 12 raises the following warning: ../drivers/vdpa/ifc/ifcvf_vdpa.c: In function ‘vdpa_enable_vfio_intr’: ../drivers/vdpa/ifc/ifcvf_vdpa.c:383:62: error: writing 4 bytes into a region of size 0 [-Werror=stringop-overflow=] 383 | fd_ptr[RTE_INTR_VEC_RXTX_OFFSET + i] = fd; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ ../drivers/vdpa/ifc/ifcvf_vdpa.c:348:14: note: at offset 32 into destination object ‘irq_set_buf’ of size 32 348 | char irq_set_buf[MSIX_IRQ_SET_BUF_LEN]; | ^~~~~~~~~~~ Validate number of vrings to avoid out of bound access. Bugzilla ID: 855 Signed-off-by: David Marchand Acked-by: Xiao Wang Acked-by: Stephen Hemminger --- drivers/net/ifc/ifcvf_vdpa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c index da4667ba54..e0044ec29e 100644 --- a/drivers/net/ifc/ifcvf_vdpa.c +++ b/drivers/net/ifc/ifcvf_vdpa.c @@ -356,6 +356,8 @@ vdpa_enable_vfio_intr(struct ifcvf_internal *internal, bool m_rx) vring.callfd = -1; nr_vring = rte_vhost_get_vring_num(internal->vid); + if (nr_vring > IFCVF_MAX_QUEUES * 2) + return -1; irq_set = (struct vfio_irq_set *)irq_set_buf; irq_set->argsz = sizeof(irq_set_buf); -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:13.445765717 +0200 +++ 0054-vdpa-ifc-fix-build-with-GCC-12.patch 2022-07-07 09:54:10.945824494 +0200 @@ -1 +1 @@ -From 2a213b794fdd255fde7581a7c9bd034ab39e9b6a Mon Sep 17 00:00:00 2001 +From 777f8832c69c86d8e1d96c6a97dd6e5596f3763f Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 2a213b794fdd255fde7581a7c9bd034ab39e9b6a ] + @@ -24 +25,0 @@ -Cc: stable@dpdk.org @@ -30 +31 @@ - drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++ + drivers/net/ifc/ifcvf_vdpa.c | 2 ++ @@ -33,5 +34,5 @@ -diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c -index 40a18b2507..8bc971cb12 100644 ---- a/drivers/vdpa/ifc/ifcvf_vdpa.c -+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c -@@ -388,6 +388,8 @@ vdpa_enable_vfio_intr(struct ifcvf_internal *internal, bool m_rx) +diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c +index da4667ba54..e0044ec29e 100644 +--- a/drivers/net/ifc/ifcvf_vdpa.c ++++ b/drivers/net/ifc/ifcvf_vdpa.c +@@ -356,6 +356,8 @@ vdpa_enable_vfio_intr(struct ifcvf_internal *internal, bool m_rx)