From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2705AA04A3 for ; Fri, 5 Jun 2020 20:25:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F3C11D510; Fri, 5 Jun 2020 20:25:49 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id B72701D51C for ; Fri, 5 Jun 2020 20:25:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591381546; 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=TlSnUaasTF3HVhIkae6gs3R3Jz/VT6wyhxYMBobLVcI=; b=Dx0Mpn+t6DtMqOQYVk3LopLYRRykGKAG+y2yNZFytLWgkoZAthkkf+HFtVBQtY97B6pWj9 4xeQuZZT8NzkCtbfcg5rtppKNFEDNdKx4tWTx1ED4iIkIhkv6oj7qi6lP7O9br9bYWtI+x cXEJiwaN9HWe/eot6592kGtZ5ughHNo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-166-GQZ2TNvvNJmt5vkThqQuVg-1; Fri, 05 Jun 2020 14:25:43 -0400 X-MC-Unique: GQZ2TNvvNJmt5vkThqQuVg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D7FAE835B40; Fri, 5 Jun 2020 18:25:42 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB06C60C47; Fri, 5 Jun 2020 18:25:41 +0000 (UTC) From: Kevin Traynor To: Kevin Traynor Cc: Bruce Richardson , Konstantin Ananyev , dpdk stable Date: Fri, 5 Jun 2020 19:24:02 +0100 Message-Id: <20200605182525.22483-5-ktraynor@redhat.com> In-Reply-To: <20200605182525.22483-1-ktraynor@redhat.com> References: <20200605182525.22483-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'eal/x86: ignore gcc 10 stringop-overflow warnings' has been queued to LTS release 18.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/10/20. 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/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/2d982535371cdc6ee86dfdf8ed20a915d464843c Thanks. Kevin. --- >From 2d982535371cdc6ee86dfdf8ed20a915d464843c Mon Sep 17 00:00:00 2001 From: Kevin Traynor Date: Fri, 17 Apr 2020 16:43:35 +0100 Subject: [PATCH] eal/x86: ignore gcc 10 stringop-overflow warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit b5b3ea803e4741ad6a46a38d8227c78226d9054d ] stringop-overflow warns when it sees a possible overflow in a string operation. In the rte_memcpy functions different branches are taken depending on the size. stringop-overflow is raised for the branches in the function where it sees the static size of the src could be overflowed. However, in reality a correct size argument and in some cases dynamic allocation would ensure that this does not happen. For example, in the case below for key, the correct path will be chosen in rte_memcpy_generic at runtime based on the size argument but as some paths in the function could lead to a cast to 32 bytes a warning is raised. In function ‘_mm256_storeu_si256’, inlined from ‘rte_memcpy_generic’ at ../lib/librte_eal/common/include/arch/x86/rte_memcpy.h:315:2, inlined from ‘iavf_configure_rss_key’ at ../lib/librte_eal/common/include/arch/x86/rte_memcpy.h:869:10: /usr/lib/gcc/x86_64-redhat-linux/10/include/avxintrin.h:928:8: warning: writing 32 bytes into a region of size 1 [-Wstringop-overflow=] 928 | *__P = __A; | ~~~~~^~~~~ In file included from ../drivers/net/iavf/../../common/iavf/iavf_prototype.h:10, from ../drivers/net/iavf/iavf.h:9, from ../drivers/net/iavf/iavf_vchnl.c:22: ../drivers/net/iavf/iavf_vchnl.c: In function ‘iavf_configure_rss_key’: ../drivers/net/iavf/../../common/iavf/virtchnl.h:508:5: note: at offset 0 to object ‘key’ with size 1 declared here 508 | u8 key[1]; /* RSS hash key, packed bytes */ | ^~~ Ignore the stringop-overflow warnings for rte_memcpy.h functions. Bugzilla ID: 394 Bugzilla ID: 421 Signed-off-by: Kevin Traynor Acked-by: Bruce Richardson Acked-by: Konstantin Ananyev --- lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h index ba44c4a328..9c67232df9 100644 --- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h +++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h @@ -23,4 +23,9 @@ extern "C" { #endif +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + /** * Copy bytes from one location to another. The locations must not overlap. @@ -870,4 +875,8 @@ rte_memcpy(void *dst, const void *src, size_t n) } +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000) +#pragma GCC diagnostic pop +#endif + #ifdef __cplusplus } -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-06-05 19:20:51.233448247 +0100 +++ 0005-eal-x86-ignore-gcc-10-stringop-overflow-warnings.patch 2020-06-05 19:20:50.705043199 +0100 @@ -1 +1 @@ -From b5b3ea803e4741ad6a46a38d8227c78226d9054d Mon Sep 17 00:00:00 2001 +From 2d982535371cdc6ee86dfdf8ed20a915d464843c Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit b5b3ea803e4741ad6a46a38d8227c78226d9054d ] + @@ -52 +53,0 @@ -Cc: stable@dpdk.org @@ -58 +59 @@ - lib/librte_eal/x86/include/rte_memcpy.h | 9 +++++++++ + lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 9 +++++++++ @@ -61 +62 @@ -diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h +diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h @@ -63,2 +64,2 @@ ---- a/lib/librte_eal/x86/include/rte_memcpy.h -+++ b/lib/librte_eal/x86/include/rte_memcpy.h +--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h ++++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h