From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Kai Ji <kai.ji@intel.com>, Akhil Goyal <gakhil@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>
Subject: [PATCH v2 1/3] app/crypto-perf: fix asymmetric op pool name size
Date: Tue, 22 Sep 2026 08:52:08 -0700 [thread overview]
Message-ID: <20260922155249.3115271-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20260922155249.3115271-1-stephen@networkplumber.org>
The asymmetric op pool name buffer is 32 bytes but snprintf is given
RTE_MEMPOOL_NAMESIZE as the size. This is harmless only as long as
RTE_MEMPOOL_NAMESIZE is not larger than 32.
Size the buffer with RTE_MEMPOOL_NAMESIZE and use sizeof() for the
snprintf limit, as the symmetric path already does.
Fixes: ba588ce3f933 ("test/crypto-perf: test asymmetric crypto throughput")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test-crypto-perf/cperf_test_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 0bcaa6dfd8..b2eabf470e 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -145,7 +145,7 @@ cperf_alloc_common_memory(const struct cperf_options *options,
struct rte_mempool **pool)
{
const char *mp_ops_name;
- char pool_name[32] = "";
+ char pool_name[RTE_MEMPOOL_NAMESIZE] = "";
int ret;
/* Calculate the object size */
@@ -154,7 +154,7 @@ cperf_alloc_common_memory(const struct cperf_options *options,
if (cperf_is_asym_test(options)) {
crypto_op_size += sizeof(struct rte_crypto_asym_op);
- snprintf(pool_name, RTE_MEMPOOL_NAMESIZE, "perf_asym_op_pool%u",
+ snprintf(pool_name, sizeof(pool_name), "perf_asym_op_pool%u",
rte_socket_id());
*pool = rte_crypto_op_pool_create(
pool_name, RTE_CRYPTO_OP_TYPE_ASYMMETRIC,
--
2.53.0
next prev parent reply other threads:[~2026-09-22 15:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 21:57 [PATCH] eal: increase memzone name size to 64 Stephen Hemminger
2026-09-22 10:42 ` Morten Brørup
2026-09-22 15:52 ` [PATCH v2 0/3] increase memzone name size and fix rib/fib prefixes Stephen Hemminger
2026-09-22 15:52 ` Stephen Hemminger [this message]
2026-09-22 18:25 ` [EXTERNAL] [PATCH v2 1/3] app/crypto-perf: fix asymmetric op pool name size Akhil Goyal
2026-09-22 15:52 ` [PATCH v2 2/3] eal: increase memzone name size to 64 Stephen Hemminger
2026-09-22 15:52 ` [PATCH v2 3/3] fib, rib: fix name prefixes Stephen Hemminger
2026-09-22 19:46 ` Medvedkin, Vladimir
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=20260922155249.3115271-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=kai.ji@intel.com \
--cc=kirankumark@marvell.com \
/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