DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dybkowski, AdamX" <adamx.dybkowski@intel.com>
To: Feifei Wang <feifei.wang2@arm.com>,
	"Griffin, John" <john.griffin@intel.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>,
	"Jain, Deepak K" <deepak.k.jain@intel.com>,
	Herbert Guan <herbert.guan@arm.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"nd@arm.com" <nd@arm.com>, "stable@dpdk.org" <stable@dpdk.org>,
	Ruifeng Wang <ruifeng.wang@arm.com>
Subject: Re: [dpdk-dev] [PATCH v4] crypto/qat: fix uninitilized gcc compiler warning
Date: Thu, 20 May 2021 09:06:06 +0000	[thread overview]
Message-ID: <SN6PR11MB25757CF0B2DE5B01BE42425DED2A9@SN6PR11MB2575.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210520084333.77775-1-feifei.wang2@arm.com>

> -----Original Message-----
> From: Feifei Wang <feifei.wang2@arm.com>
> Sent: Thursday, 20 May, 2021 10:44
> To: Griffin, John <john.griffin@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>;
> Herbert Guan <herbert.guan@arm.com>; Jerin Jacob
> <jerin.jacob@caviumnetworks.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Dybkowski,
> AdamX <adamx.dybkowski@intel.com>; nd@arm.com; Feifei Wang
> <feifei.wang2@arm.com>; stable@dpdk.org; Ruifeng Wang
> <ruifeng.wang@arm.com>
> Subject: [PATCH v4] crypto/qat: fix uninitilized gcc compiler warning
> 
> In Arm platform, when "RTE_ARCH_ARM64_MEMCPY" is set as true, gcc
> will report variable uninitilized warning:
> 
> ../drivers/crypto/qat/qat_sym_session.c: In function
> ‘partial_hash_compute’:
> ../lib/eal/include/generic/rte_byteorder.h:241:24: warning:
> ‘<U35a0>’ may be used uninitialized in this function
> 	[-Wmaybe-uninitialized]
> 	241 | #define rte_bswap32(x) __builtin_bswap32(x)
> 	...
> 
> This is because "digest" will be initialized by "rte_memcpy" function rather
> than "memcpy" if "RTE_ARCH_ARM64_MEMCPY" is set as true.
> Furthermore, 'rte_memcpy' will initialize 'digest' with two steps by invoking
> rte_mov_x functions. For example:
> 
> partial_hash_sha1 -> rte_memcpy -> rte_memcpy_ge16_lt_128 -> step 1:
> rte_mov16(dst,src ) step 2: rte_mov16(dst - 16 + n, src - 16 + n)
> 
> However, gcc compiler cannot identify this multi-step initialization, then it
> will report warning.
> 
> To fix this, use "memset" to initialize "digest".
> 
> Fixes: cd7fc8a84b48 ("eal/arm64: optimize memcpy")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---

Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>


  reply	other threads:[~2021-05-20  9:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14  7:41 [dpdk-dev] [PATCH] crypto/qat: fix uninitilized " Feifei Wang
2021-05-14  7:49 ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-05-14  8:01   ` [dpdk-dev] 回复: " Feifei Wang
2021-05-14  8:13     ` [dpdk-dev] " David Marchand
2021-05-14  8:30       ` [dpdk-dev] 回复: " Feifei Wang
2021-05-17  9:07 ` [dpdk-dev] [PATCH v3] " Feifei Wang
2021-05-19  7:56   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2021-05-19  8:11   ` Ferruh Yigit
2021-05-20  5:44     ` [dpdk-dev] 回复: " Feifei Wang
2021-05-20  8:08       ` Ferruh Yigit
2021-05-19 13:13   ` [dpdk-dev] " Dybkowski, AdamX
2021-05-19 13:16   ` Dybkowski, AdamX
2021-05-20  5:47     ` [dpdk-dev] 回复: " Feifei Wang
2021-05-20  8:43 ` [dpdk-dev] [PATCH v4] crypto/qat: fix uninitilized gcc " Feifei Wang
2021-05-20  9:06   ` Dybkowski, AdamX [this message]
2021-05-21  2:00 ` [dpdk-dev] [PATCH v5] crypto/qat: fix uninitialized " Feifei Wang
2021-06-29 20:04   ` [dpdk-dev] [EXT] " Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN6PR11MB25757CF0B2DE5B01BE42425DED2A9@SN6PR11MB2575.namprd11.prod.outlook.com \
    --to=adamx.dybkowski@intel.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=feifei.wang2@arm.com \
    --cc=ferruh.yigit@intel.com \
    --cc=fiona.trahe@intel.com \
    --cc=herbert.guan@arm.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=john.griffin@intel.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).