From: Ciara Power <ciara.power@intel.com>
To: dev@dpdk.org
Cc: roy.fan.zhang@intel.com, gakhil@marvell.com,
pablo.de.lara.guarch@intel.com, thomas@monjalon.net,
Ciara Power <ciara.power@intel.com>,
piotrx.bronowski@intel.com
Subject: [dpdk-dev] [PATCH] crypto/ipsec_mb: fix ZUC PMD buffer initialisation
Date: Wed, 20 Oct 2021 11:06:28 +0000 [thread overview]
Message-ID: <20211020110628.689474-1-ciara.power@intel.com> (raw)
The buffers used when processing a hash operation in the ZUC PMD should
be initialised to empty before use.
This fixes possible "may be used uninitialised" errors on compilation.
Fixes: e09b92e6474b ("drivers/crypto: move zuc PMD to IPsec-mb framework")
Cc: piotrx.bronowski@intel.com
Signed-off-by: Ciara Power <ciara.power@intel.com>
---
drivers/crypto/ipsec_mb/pmd_zuc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/ipsec_mb/pmd_zuc.c b/drivers/crypto/ipsec_mb/pmd_zuc.c
index b542264069..2eae1d1ec7 100644
--- a/drivers/crypto/ipsec_mb/pmd_zuc.c
+++ b/drivers/crypto/ipsec_mb/pmd_zuc.c
@@ -138,11 +138,11 @@ process_zuc_hash_op(struct ipsec_mb_qp *qp, struct rte_crypto_op **ops,
{
unsigned int i;
uint8_t processed_ops = 0;
- uint8_t *src[ZUC_MAX_BURST];
+ uint8_t *src[ZUC_MAX_BURST] = { 0 };
uint32_t *dst[ZUC_MAX_BURST];
- uint32_t length_in_bits[ZUC_MAX_BURST];
- uint8_t *iv[ZUC_MAX_BURST];
- const void *hash_keys[ZUC_MAX_BURST];
+ uint32_t length_in_bits[ZUC_MAX_BURST] = { 0 };
+ uint8_t *iv[ZUC_MAX_BURST] = { 0 };
+ const void *hash_keys[ZUC_MAX_BURST] = { 0 };
struct zuc_session *sess;
struct zuc_qp_data *qp_data = ipsec_mb_get_qp_private_data(qp);
--
2.25.1
next reply other threads:[~2021-10-20 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-20 11:06 Ciara Power [this message]
2021-10-20 11:12 ` Zhang, Roy Fan
2021-10-20 13:37 ` [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=20211020110628.689474-1-ciara.power@intel.com \
--to=ciara.power@intel.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=piotrx.bronowski@intel.com \
--cc=roy.fan.zhang@intel.com \
--cc=thomas@monjalon.net \
/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).