DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/ice: fix storing field offset arg
       [not found] <bug-2038-3@https.bugs.dpdk.org>
@ 2026-09-14 15:45 ` Bruce Richardson
  2026-09-25  9:41   ` Burakov, Anatoly
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2026-09-14 15:45 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

The field offset argument type inside ice driver is of "int" type, but
when parsing and storing the value from a devarg, a uint8_t type is
used, leading to 3 bytes being potentially uninitialized. Fix this by
storing to an int type instead.

Bugzilla ID: 2038
Fixes: df539aaf35cb ("net/ice: refactor flex descriptor protocol field extraction")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
Note: this fix is superceded by the kvargs numeric args patchset [1].
However, that patchset relies on new kvargs features unlikely to be
backported, so this standalone fix is useful for backporting or if the
whole other set doesn't make the 26.11 release.

[1] https://patches.dpdk.org/project/dpdk/list/?series=39247
---
 drivers/net/intel/ice/ice_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 3938186228..2f97140bef 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -735,7 +735,7 @@ static int
 handle_field_offs_arg(__rte_unused const char *key, const char *value,
 				void *offs_args)
 {
-	uint8_t *offset = offs_args;
+	int *offset = offs_args;
 
 	if (value == NULL || offs_args == NULL)
 		return -EINVAL;
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/ice: fix storing field offset arg
  2026-09-14 15:45 ` [PATCH] net/ice: fix storing field offset arg Bruce Richardson
@ 2026-09-25  9:41   ` Burakov, Anatoly
  2026-09-25 13:16     ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Burakov, Anatoly @ 2026-09-25  9:41 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: stable

On 9/14/2026 5:45 PM, Bruce Richardson wrote:
> The field offset argument type inside ice driver is of "int" type, but
> when parsing and storing the value from a devarg, a uint8_t type is
> used, leading to 3 bytes being potentially uninitialized. Fix this by
> storing to an int type instead.
> 
> Bugzilla ID: 2038
> Fixes: df539aaf35cb ("net/ice: refactor flex descriptor protocol field extraction")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> Note: this fix is superceded by the kvargs numeric args patchset [1].
> However, that patchset relies on new kvargs features unlikely to be
> backported, so this standalone fix is useful for backporting or if the
> whole other set doesn't make the 26.11 release.
> 
> [1] https://patches.dpdk.org/project/dpdk/list/?series=39247
> ---


Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/ice: fix storing field offset arg
  2026-09-25  9:41   ` Burakov, Anatoly
@ 2026-09-25 13:16     ` Bruce Richardson
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2026-09-25 13:16 UTC (permalink / raw)
  To: Burakov, Anatoly; +Cc: dev, stable

On Fri, Sep 25, 2026 at 11:41:08AM +0200, Burakov, Anatoly wrote:
> On 9/14/2026 5:45 PM, Bruce Richardson wrote:
> > The field offset argument type inside ice driver is of "int" type, but
> > when parsing and storing the value from a devarg, a uint8_t type is
> > used, leading to 3 bytes being potentially uninitialized. Fix this by
> > storing to an int type instead.
> > 
> > Bugzilla ID: 2038
> > Fixes: df539aaf35cb ("net/ice: refactor flex descriptor protocol field extraction")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> > Note: this fix is superceded by the kvargs numeric args patchset [1].
> > However, that patchset relies on new kvargs features unlikely to be
> > backported, so this standalone fix is useful for backporting or if the
> > whole other set doesn't make the 26.11 release.
> > 
> > [1] https://patches.dpdk.org/project/dpdk/list/?series=39247
> > ---
> 
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> 
Applied to dpdk-next-net-intel.

/Bruce

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-25 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <bug-2038-3@https.bugs.dpdk.org>
2026-09-14 15:45 ` [PATCH] net/ice: fix storing field offset arg Bruce Richardson
2026-09-25  9:41   ` Burakov, Anatoly
2026-09-25 13:16     ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox