* [dpdk-dev] [PATCH v1] net/iavf: fix RSS key access out of index
@ 2021-05-19 7:59 Haiyue Wang
2021-05-20 1:23 ` Xing, Beilei
0 siblings, 1 reply; 3+ messages in thread
From: Haiyue Wang @ 2021-05-19 7:59 UTC (permalink / raw)
To: dev; +Cc: qi.z.zhang, Haiyue Wang, stable, Jingjing Wu, Beilei Xing
The array rss_key has size 'vf->vf_res->rss_key_size', the array index
should be less than that.
Cc: stable@dpdk.org
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/iavf/iavf_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index d688c31cfb..cb38fe81e1 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -366,7 +366,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
/* configure RSS key */
if (!rss_conf->rss_key) {
/* Calculate the default hash key */
- for (i = 0; i <= vf->vf_res->rss_key_size; i++)
+ for (i = 0; i < vf->vf_res->rss_key_size; i++)
vf->rss_key[i] = (uint8_t)rte_rand();
} else
rte_memcpy(vf->rss_key, rss_conf->rss_key,
--
2.31.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v1] net/iavf: fix RSS key access out of index
2021-05-19 7:59 [dpdk-dev] [PATCH v1] net/iavf: fix RSS key access out of index Haiyue Wang
@ 2021-05-20 1:23 ` Xing, Beilei
2021-05-27 9:51 ` Zhang, Qi Z
0 siblings, 1 reply; 3+ messages in thread
From: Xing, Beilei @ 2021-05-20 1:23 UTC (permalink / raw)
To: Wang, Haiyue, dev; +Cc: Zhang, Qi Z, stable, Wu, Jingjing
> -----Original Message-----
> From: Wang, Haiyue <haiyue.wang@intel.com>
> Sent: Wednesday, May 19, 2021 4:00 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>; stable@dpdk.org; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Subject: [PATCH v1] net/iavf: fix RSS key access out of index
>
> The array rss_key has size 'vf->vf_res->rss_key_size', the array index should
> be less than that.
>
> Cc: stable@dpdk.org
> Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
>
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> ---
> drivers/net/iavf/iavf_ethdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> index d688c31cfb..cb38fe81e1 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -366,7 +366,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
> /* configure RSS key */
> if (!rss_conf->rss_key) {
> /* Calculate the default hash key */
> - for (i = 0; i <= vf->vf_res->rss_key_size; i++)
> + for (i = 0; i < vf->vf_res->rss_key_size; i++)
> vf->rss_key[i] = (uint8_t)rte_rand();
> } else
> rte_memcpy(vf->rss_key, rss_conf->rss_key,
> --
> 2.31.1
Acked-by: Beilei Xing <beilei.xing@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v1] net/iavf: fix RSS key access out of index
2021-05-20 1:23 ` Xing, Beilei
@ 2021-05-27 9:51 ` Zhang, Qi Z
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2021-05-27 9:51 UTC (permalink / raw)
To: Xing, Beilei, Wang, Haiyue, dev; +Cc: stable, Wu, Jingjing
> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Thursday, May 20, 2021 9:24 AM
> To: Wang, Haiyue <haiyue.wang@intel.com>; dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org; Wu, Jingjing
> <jingjing.wu@intel.com>
> Subject: RE: [PATCH v1] net/iavf: fix RSS key access out of index
>
>
>
> > -----Original Message-----
> > From: Wang, Haiyue <haiyue.wang@intel.com>
> > Sent: Wednesday, May 19, 2021 4:00 PM
> > To: dev@dpdk.org
> > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wang, Haiyue
> > <haiyue.wang@intel.com>; stable@dpdk.org; Wu, Jingjing
> > <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> > Subject: [PATCH v1] net/iavf: fix RSS key access out of index
> >
> > The array rss_key has size 'vf->vf_res->rss_key_size', the array index
> > should be less than that.
> >
> > Cc: stable@dpdk.org
> > Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
> >
> > Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> > ---
> > drivers/net/iavf/iavf_ethdev.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/iavf/iavf_ethdev.c
> > b/drivers/net/iavf/iavf_ethdev.c index d688c31cfb..cb38fe81e1 100644
> > --- a/drivers/net/iavf/iavf_ethdev.c
> > +++ b/drivers/net/iavf/iavf_ethdev.c
> > @@ -366,7 +366,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
> > /* configure RSS key */
> > if (!rss_conf->rss_key) {
> > /* Calculate the default hash key */
> > - for (i = 0; i <= vf->vf_res->rss_key_size; i++)
> > + for (i = 0; i < vf->vf_res->rss_key_size; i++)
> > vf->rss_key[i] = (uint8_t)rte_rand();
> > } else
> > rte_memcpy(vf->rss_key, rss_conf->rss_key,
> > --
> > 2.31.1
>
> Acked-by: Beilei Xing <beilei.xing@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-27 9:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 7:59 [dpdk-dev] [PATCH v1] net/iavf: fix RSS key access out of index Haiyue Wang
2021-05-20 1:23 ` Xing, Beilei
2021-05-27 9:51 ` Zhang, Qi Z
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).