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 59838A0093 for ; Tue, 19 May 2020 15:12:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 456B31D8D1; Tue, 19 May 2020 15:12:55 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 1E68D1D702 for ; Tue, 19 May 2020 15:12:53 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id i15so15804034wrx.10 for ; Tue, 19 May 2020 06:12:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=it1caJQ2FubhsdeuA6wkG4191Lq5jVGrlIZ8ZUyxsRY=; b=CLFrj/jh6UD7pj068r6gWk+a8Bknj+b01fGcjDGztEiiw/YyFJYHMIdXiUiCvoHuWr GQ/FR1NpDf32ja2rWmL3/58HzGTpJf0jSw2hdaWcg10YmLuJhMagZt/UhSVsDL6DeZqA tXbjRY8c+UbNtfBy/87EGWe+sX1STmg3YCe0wy0yd+aiVtdHzpNX1hy5N6oGGHpq6yEk +JXqc5lrDLTIl/2YIy88ihGkcBcfRLDSMyrqnxK5fl1pNDzCCakFsFOhN82awtLPVofY +YIXM3IlpQGedvnilucl9nawFQKPwU8W39iD6V8qCb4f2ic4K+A4MKi7c9kvSFEvf97i Rlqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=it1caJQ2FubhsdeuA6wkG4191Lq5jVGrlIZ8ZUyxsRY=; b=AATqTiVM/QiRNvnCcj7PrVSYOCTbgdK7+83XK1+D0V9z1dXtMHCTP0k0X4OF/2JGi5 JtV6GW9fel3nHuaf8Y9eGZBiuL0oiSHZt7BUhktAEAV5gYDKEVxyDriLZ22GHkGqog6o 5nZUvdDGaYygsBsyPpFia896GTlUqLrSt47vTzXnFL6sDQ6yOatl853a8Io2NH81xphJ Rxz2Eer/8H9tDZVVPnDTc55NNFCiyK2QdfrYOC4CEizTFMe0XD9QKyK+CfFNhxrH2euW BZQNJNSFtzLe7NQGR85WfNpnXlBPbICVUtrKlRV6vS3IlpjDhg8qzIWBbPIY7Jr07Zzn epQg== X-Gm-Message-State: AOAM530gVI4xE9ptYvzqiNKk4PU2LezIkh5lzOR2xNP1MkB2y4qPt1uz QjGmTyearDNcPVQxh1mdYnE= X-Google-Smtp-Source: ABdhPJzqfIebkdjoM+YkibgK7np4NArd3JVfq7+J9WNncALgPAjer1sVvaUA3ImFxcz3Qwyr0jq8ug== X-Received: by 2002:adf:cd92:: with SMTP id q18mr26672757wrj.237.1589893972853; Tue, 19 May 2020 06:12:52 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id q9sm3710280wmb.34.2020.05.19.06.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:12:52 -0700 (PDT) From: luca.boccassi@gmail.com To: Kevin Traynor Cc: Bruce Richardson , Konstantin Ananyev , dpdk stable Date: Tue, 19 May 2020 14:04:28 +0100 Message-Id: <20200519130549.112823-133-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 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 stable release 19.11.3 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 stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/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. Thanks. Luca Boccassi --- >From df17bcb43b419b5157a8e202d6277aa4a0029bae 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 @@ -22,6 +22,11 @@ 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. * @@ -869,6 +874,10 @@ rte_memcpy(void *dst, const void *src, size_t n) return rte_memcpy_generic(dst, src, n); } +#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000) +#pragma GCC diagnostic pop +#endif + #ifdef __cplusplus } #endif -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:49.865529125 +0100 +++ 0133-eal-x86-ignore-gcc-10-stringop-overflow-warnings.patch 2020-05-19 14:04:44.444652506 +0100 @@ -1,4 +1,4 @@ -From b5b3ea803e4741ad6a46a38d8227c78226d9054d Mon Sep 17 00:00:00 2001 +From df17bcb43b419b5157a8e202d6277aa4a0029bae 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 @@ -6,6 +6,8 @@ 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. @@ -49,19 +51,18 @@ Bugzilla ID: 394 Bugzilla ID: 421 -Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Acked-by: Bruce Richardson Acked-by: Konstantin Ananyev --- - lib/librte_eal/x86/include/rte_memcpy.h | 9 +++++++++ + lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 9 +++++++++ 1 file changed, 9 insertions(+) -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 index ba44c4a328..9c67232df9 100644 ---- 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 @@ -22,6 +22,11 @@ extern "C" { #endif