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 C927AA034F; Wed, 6 May 2020 11:20:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 994861D6C5; Wed, 6 May 2020 11:20:40 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 6B0861D6BF for ; Wed, 6 May 2020 11:20:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588756838; 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=EDVzawErB3M7oBLhytGnMZqshVyb2e+zE2BOK6gPQxk=; b=XxbjKzbBbMDCXfWvMJ4gh81PKOJzZD038WgDCDlWstvhSV0iIxrTHscsdtpV10dnxUyaCx ZDaGgfIYS1ANnwmhA010f0Ik4pqtNwe/fwRYDEKaUOHIUdXHexq0L4v5HNDM9qvsYZLMUE 8X3pKgyPWrLJqMJNMtqtSaK8poocXDM= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-324-941PFZx0OASBgXnzfFqyfw-1; Wed, 06 May 2020 05:20:37 -0400 X-MC-Unique: 941PFZx0OASBgXnzfFqyfw-1 Received: by mail-ua1-f69.google.com with SMTP id v3so428305uat.21 for ; Wed, 06 May 2020 02:20:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=EDVzawErB3M7oBLhytGnMZqshVyb2e+zE2BOK6gPQxk=; b=Y0LMH6EtK2LFW35zU3b4620ffx9t5B8AUGS+fqMomaF3K9Ce9A9H/KunfMIjqgvJDW hEECpmaWBAxjPjGnk0SX405ocSdJugLhr/NaGO0Z+I+j5J3YoUAn7J/rZ4HP7qIsM+Uv dM7Q2GWwE+FXNt9iFZbz73CTALCuUbBa6sS/PEvkZwPYQZErSX+cLFfL6uW0wjpEEBPU Oyinjn04GWIlqaNZmzkKwP+8X10c9hjCj4bAnCM5YVvG0xeq5sPA3MgEBGBOrRVmSn2t t8l7W3RwDrWHnaqk77t1KNLFXFFRZ+sI1Pvrr11EUrkBRceyshHxvEPQTM6YU1DC/p1s 0oHg== X-Gm-Message-State: AGi0PubO794sQcW6wdoGa92DfcZ4SvsnnL46b3tVCOSsUduQAsHXRN0+ JvyiRliIRUwZUos5lIN3WfC0fPy8EkkWPHJ/PqxluDhWuqdj19SaU3ZSTnJrD9F4508SPW81Rbi dR7PNdyK+qydOr1wbDKM= X-Received: by 2002:ab0:5586:: with SMTP id v6mr5669176uaa.87.1588756836844; Wed, 06 May 2020 02:20:36 -0700 (PDT) X-Google-Smtp-Source: APiQypK3g4xkXqunQku3ZECAByBd2NM788hdMdselq8+upNgfpKSjFytZaZMW9GqnvLmWKasV2aqRG+42hCF0DBHuDI= X-Received: by 2002:ab0:5586:: with SMTP id v6mr5669158uaa.87.1588756836587; Wed, 06 May 2020 02:20:36 -0700 (PDT) MIME-Version: 1.0 References: <20200416184549.10747-1-ktraynor@redhat.com> <20200417154335.14147-1-ktraynor@redhat.com> In-Reply-To: <20200417154335.14147-1-ktraynor@redhat.com> From: David Marchand Date: Wed, 6 May 2020 11:20:25 +0200 Message-ID: To: Kevin Traynor Cc: dev , Thomas Monjalon , Bruce Richardson , Gavin Hu , "Ananyev, Konstantin" , Ravi Kumar , Gagandeep Singh , Hemant Agrawal , Akhil Goyal , John Daley , Hyong Youb Kim , Jingjing Wu , Wenzhuo Lu , Rasesh Mody , Shahed Shaikh , Matan Azrad , Shahaf Shuler , Declan Doherty , Cristian Dumitrescu X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v3] x86/eal: gcc 10 ignore stringop-overflow warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Apr 17, 2020 at 5:44 PM Kevin Traynor wrote: > > 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 =E2=80=98_mm256_storeu_si256=E2=80=99, > inlined from =E2=80=98rte_memcpy_generic=E2=80=99 > at ../lib/librte_eal/common/include/arch/x86/rte_memcpy.h:315:2, > inlined from =E2=80=98iavf_configure_rss_key=E2=80=99 > 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=3D= ] > 928 | *__P =3D __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 =E2=80=98iavf_configure_rss_key=E2=80=99: > > ../drivers/net/iavf/../../common/iavf/virtchnl.h:508:5: > note: at offset 0 to object =E2=80=98key=E2=80=99 with size 1 declared he= re > 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 > Cc: stable@dpdk.org > Signed-off-by: Kevin Traynor Acked-by: Bruce Richardson Acked-by: Konstantin Ananyev Applied, thanks. --=20 David Marchand