From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
rbhansali@marvell.com, stable@dpdk.org
Subject: [PATCH 2/2] net/cnxk: fix overrun in dis_xqe_drop
Date: Mon, 22 Sep 2025 21:45:29 -0700 [thread overview]
Message-ID: <20250923044528.89132-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20250923044528.89132-2-stephen@networkplumber.org>
The function parse_flag expects 16 bit value for flag,
but dis_xqe_drop is a byte. Detected when LTO enabled as:
../drivers/net/cnxk/cnxk_ethdev_devargs.c:166: warning: writing 2 bytes into a region of size 1 [-Wstringop-overflow=]
166 | *(uint16_t *)extra_args = atoi(value);
../drivers/net/cnxk/cnxk_ethdev_devargs.c: In function ‘cnxk_ethdev_parse_devargs’:
../drivers/net/cnxk/cnxk_ethdev_devargs.c:312:17: note: destination object ‘dis_xqe_drop’ of size 1
312 | uint8_t dis_xqe_drop = 0;
| ^
Bugzilla ID: 1790
Fixes: 0344fb5a59c2 ("net/cnxk: add option to disable XQE drop")
Cc: rbhansali@marvell.com
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/cnxk/cnxk_ethdev_devargs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/cnxk/cnxk_ethdev_devargs.c b/drivers/net/cnxk/cnxk_ethdev_devargs.c
index 5d774e0d70..68e6b1d190 100644
--- a/drivers/net/cnxk/cnxk_ethdev_devargs.c
+++ b/drivers/net/cnxk/cnxk_ethdev_devargs.c
@@ -309,7 +309,7 @@ cnxk_ethdev_parse_devargs(struct rte_devargs *devargs, struct cnxk_eth_dev *dev)
uint16_t custom_sa_act = 0;
uint16_t custom_inb_sa = 0;
struct rte_kvargs *kvlist;
- uint8_t dis_xqe_drop = 0;
+ uint16_t dis_xqe_drop = 0;
uint32_t meta_buf_sz = 0;
uint16_t lock_rx_ctx = 0;
uint16_t rx_inj_ena = 0;
--
2.47.3
next prev parent reply other threads:[~2025-09-23 4:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 4:45 [PATCH 1/2] net/cnxk: fix overrun when processing tail drop arg Stephen Hemminger
2025-09-23 4:45 ` Stephen Hemminger [this message]
2025-09-23 9:28 ` [PATCH 2/2] net/cnxk: fix overrun in dis_xqe_drop Jerin Jacob
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=20250923044528.89132-3-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=rbhansali@marvell.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).