* [dpdk-dev] [PATCH] net/ice: fix EEPROM range check
@ 2019-05-05 5:48 Xiao Wang
2019-05-05 5:48 ` Xiao Wang
2019-05-06 0:37 ` Zhang, Qi Z
0 siblings, 2 replies; 4+ messages in thread
From: Xiao Wang @ 2019-05-05 5:48 UTC (permalink / raw)
To: wenzhuo.lu; +Cc: dev, qiming.yang, leyi.rong, Xiao Wang, stable
The last word should not cross shadow RAM boundary.
Fixes: 68a1ab82ad74 ("net/ice: speed up to retrieve EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 706632424..3d2f35bb0 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3002,8 +3002,8 @@ ice_get_eeprom(struct rte_eth_dev *dev,
last_word = (eeprom->offset + eeprom->length - 1) >> 1;
nwords = last_word - first_word + 1;
- if (first_word > hw->nvm.sr_words ||
- last_word > hw->nvm.sr_words) {
+ if (first_word >= hw->nvm.sr_words ||
+ last_word >= hw->nvm.sr_words) {
PMD_DRV_LOG(ERR, "Requested EEPROM bytes out of range.");
return -EINVAL;
}
--
2.15.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH] net/ice: fix EEPROM range check
2019-05-05 5:48 [dpdk-dev] [PATCH] net/ice: fix EEPROM range check Xiao Wang
@ 2019-05-05 5:48 ` Xiao Wang
2019-05-06 0:37 ` Zhang, Qi Z
1 sibling, 0 replies; 4+ messages in thread
From: Xiao Wang @ 2019-05-05 5:48 UTC (permalink / raw)
To: wenzhuo.lu; +Cc: dev, qiming.yang, leyi.rong, Xiao Wang, stable
The last word should not cross shadow RAM boundary.
Fixes: 68a1ab82ad74 ("net/ice: speed up to retrieve EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 706632424..3d2f35bb0 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3002,8 +3002,8 @@ ice_get_eeprom(struct rte_eth_dev *dev,
last_word = (eeprom->offset + eeprom->length - 1) >> 1;
nwords = last_word - first_word + 1;
- if (first_word > hw->nvm.sr_words ||
- last_word > hw->nvm.sr_words) {
+ if (first_word >= hw->nvm.sr_words ||
+ last_word >= hw->nvm.sr_words) {
PMD_DRV_LOG(ERR, "Requested EEPROM bytes out of range.");
return -EINVAL;
}
--
2.15.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ice: fix EEPROM range check
2019-05-05 5:48 [dpdk-dev] [PATCH] net/ice: fix EEPROM range check Xiao Wang
2019-05-05 5:48 ` Xiao Wang
@ 2019-05-06 0:37 ` Zhang, Qi Z
2019-05-06 0:37 ` Zhang, Qi Z
1 sibling, 1 reply; 4+ messages in thread
From: Zhang, Qi Z @ 2019-05-06 0:37 UTC (permalink / raw)
To: Wang, Xiao W, Lu, Wenzhuo
Cc: dev, Yang, Qiming, Rong, Leyi, Wang, Xiao W, stable
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xiao Wang
> Sent: Sunday, May 5, 2019 1:48 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Rong, Leyi
> <leyi.rong@intel.com>; Wang, Xiao W <xiao.w.wang@intel.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/ice: fix EEPROM range check
>
> The last word should not cross shadow RAM boundary.
>
> Fixes: 68a1ab82ad74 ("net/ice: speed up to retrieve EEPROM")
> Cc: stable@dpdk.org
>
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ice: fix EEPROM range check
2019-05-06 0:37 ` Zhang, Qi Z
@ 2019-05-06 0:37 ` Zhang, Qi Z
0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2019-05-06 0:37 UTC (permalink / raw)
To: Wang, Xiao W, Lu, Wenzhuo
Cc: dev, Yang, Qiming, Rong, Leyi, Wang, Xiao W, stable
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xiao Wang
> Sent: Sunday, May 5, 2019 1:48 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Rong, Leyi
> <leyi.rong@intel.com>; Wang, Xiao W <xiao.w.wang@intel.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/ice: fix EEPROM range check
>
> The last word should not cross shadow RAM boundary.
>
> Fixes: 68a1ab82ad74 ("net/ice: speed up to retrieve EEPROM")
> Cc: stable@dpdk.org
>
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-06 0:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-05 5:48 [dpdk-dev] [PATCH] net/ice: fix EEPROM range check Xiao Wang
2019-05-05 5:48 ` Xiao Wang
2019-05-06 0:37 ` Zhang, Qi Z
2019-05-06 0:37 ` 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).