From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: dev@dpdk.org
Cc: pablo.de.lara.guarch@intel.com, thomas@monjalon.net,
Jerin Jacob <jerin.jacob@caviumnetworks.com>,
declan.doherty@intel.com, andy@warmcat.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2 2/2] app/crypto-perf: fix memcpy source
Date: Wed, 16 May 2018 17:58:04 +0530 [thread overview]
Message-ID: <20180516122804.535-2-jerin.jacob@caviumnetworks.com> (raw)
In-Reply-To: <20180516122804.535-1-jerin.jacob@caviumnetworks.com>
Since arm64 was using plain memcpy for rte_memcpy, gcc 8.1, could
detect size was more than source address range. In this case, the
source was wrong.
/export/dpdk.org/test/test/test_cryptodev.c: In function
'test_multi_session_random_usage':
/export/dpdk.org/build/include/rte_memcpy_64.h:364:29: error: 'memcpy'
forming offset [113, 184] is out of the bounds [0, 112] of object
'testsuite_params' with type 'struct crypto_testsuite_params'
[-Werror=array-bounds]
#define rte_memcpy(d, s, n) memcpy((d), (s), (n))
^~~~~~~~~~~~~~~~~~~~~
/export/dpdk.org/test/test/test_cryptodev.c:6618:3: note: in expansion
of macro 'rte_memcpy'
rte_memcpy(&ut_paramz[i].ut_params, &testsuite_params,
^~~~~~~~~~
/export/dpdk.org/test/test/test_cryptodev.c:140:39: note:
'testsuite_params' declared here
static struct crypto_testsuite_params testsuite_params = { NULL };
Fixes: ffbe3be0d4b5 ("app/test: add libcrypto")
Cc: pablo.de.lara.guarch@intel.com
Cc: declan.doherty@intel.com
Cc: andy@warmcat.com
Cc: stable@dpdk.org
Suggested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
v2:
- Addressed http://dpdk.org/dev/patchwork/patch/40086/ comments
---
test/test/test_cryptodev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 680082f2b..940e3378a 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -6615,7 +6615,7 @@ test_multi_session_random_usage(void)
sessions[i] = rte_cryptodev_sym_session_create(
ts_params->session_mpool);
- rte_memcpy(&ut_paramz[i].ut_params, &testsuite_params,
+ rte_memcpy(&ut_paramz[i].ut_params, &unittest_params,
sizeof(struct crypto_unittest_params));
test_AES_CBC_HMAC_SHA512_decrypt_create_session_params(
--
2.17.0
next prev parent reply other threads:[~2018-05-16 12:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-16 6:39 [dpdk-dev] [PATCH 1/2] app/crypto-perf: use strcpy for allocated string Jerin Jacob
2018-05-16 6:39 ` [dpdk-dev] [PATCH 2/2] app/crypto-perf: fix memcpy source range Jerin Jacob
2018-05-16 11:40 ` De Lara Guarch, Pablo
2018-05-16 11:59 ` Jerin Jacob
2018-05-16 9:50 ` [dpdk-dev] [PATCH 1/2] app/crypto-perf: use strcpy for allocated string De Lara Guarch, Pablo
2018-05-16 12:28 ` [dpdk-dev] [PATCH v2 " Jerin Jacob
2018-05-16 12:28 ` Jerin Jacob [this message]
2018-05-16 12:44 ` [dpdk-dev] [PATCH v2 2/2] app/crypto-perf: fix memcpy source Andy Green
2018-05-16 12:50 ` De Lara Guarch, Pablo
2018-05-17 16:31 ` De Lara Guarch, Pablo
2018-05-17 16:31 ` [dpdk-dev] [PATCH v2 1/2] app/crypto-perf: use strcpy for allocated string De Lara Guarch, Pablo
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=20180516122804.535-2-jerin.jacob@caviumnetworks.com \
--to=jerin.jacob@caviumnetworks.com \
--cc=andy@warmcat.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
--cc=stable@dpdk.org \
--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).