DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/5] net/fm10k: fix dereference after null check coverity
@ 2019-08-04 21:00 Xiao Zhang
  2019-08-04 21:00 ` [dpdk-dev] [PATCH 2/5] net/iavf: " Xiao Zhang
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-04 21:00 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, qiming.yang, Xiao Zhang, stable

The address of receive queue start segment was not updated when found by
iterated checking, update the address to fix coverity issue.

Coverity issue: 343416
Fixes: fe65e1e1 ("fm10k: add vector scatter Rx")

Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/fm10k/fm10k_rxtx_vec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index 788e248..9f2c4ac 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -676,6 +676,7 @@ fm10k_recv_scattered_pkts_vec(void *rx_queue,
 		/* find the first split flag, and only reassemble then*/
 		while (i < nb_bufs && !split_flags[i])
 			i++;
+		rxq->pkt_first_seg = rx_pkts[i];
 		if (i == nb_bufs)
 			return nb_bufs;
 	}
-- 
2.7.4


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

* [dpdk-dev] [PATCH 2/5] net/iavf: fix dereference after null check coverity
  2019-08-04 21:00 [dpdk-dev] [PATCH 1/5] net/fm10k: fix dereference after null check coverity Xiao Zhang
@ 2019-08-04 21:00 ` Xiao Zhang
  2019-08-04 21:00 ` [dpdk-dev] [PATCH 3/5] net/i40e: " Xiao Zhang
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-04 21:00 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, qiming.yang, Xiao Zhang, stable

The address of receive queue start segment was not updated when found by
iterated checking, update the address to fix coverity issue.

Coverity issue: 343447
Fixes: 319c421f ("net/avf: enable SSE Rx Tx")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_sse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 3d98514..d3ac125 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -519,6 +519,7 @@ iavf_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		/* find the first split flag, and only reassemble then*/
 		while (i < nb_bufs && !split_flags[i])
 			i++;
+		rxq->pkt_first_seg = rx_pkts[i];
 		if (i == nb_bufs)
 			return nb_bufs;
 	}
-- 
2.7.4


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

* [dpdk-dev] [PATCH 3/5] net/i40e: fix dereference after null check coverity
  2019-08-04 21:00 [dpdk-dev] [PATCH 1/5] net/fm10k: fix dereference after null check coverity Xiao Zhang
  2019-08-04 21:00 ` [dpdk-dev] [PATCH 2/5] net/iavf: " Xiao Zhang
@ 2019-08-04 21:00 ` Xiao Zhang
  2019-08-04 21:00 ` [dpdk-dev] [PATCH 4/5] net/ice: " Xiao Zhang
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-04 21:00 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, qiming.yang, Xiao Zhang, stable

The address of receive queue start segment was not updated when found by
iterated checking, update the address to fix coverity issue.

Coverity issue: 343422
Coverity issue: 343403
Fixes: ca74903b ("net/i40e: extract non-x86 specific code from vector
driver")

Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx_vec_avx2.c | 1 +
 drivers/net/i40e/i40e_rxtx_vec_sse.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index c4dc990..0cbb2c2 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -588,6 +588,7 @@ i40e_recv_scattered_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts,
 		/* find the first split flag, and only reassemble then*/
 		while (i < nb_bufs && !split_flags[i])
 			i++;
+		rxq->pkt_first_seg = rx_pkts[i];
 		if (i == nb_bufs)
 			return nb_bufs;
 	}
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index 3b22588..89ffc23 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -504,6 +504,7 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		/* find the first split flag, and only reassemble then*/
 		while (i < nb_bufs && !split_flags[i])
 			i++;
+		rxq->pkt_first_seg = rx_pkts[i];
 		if (i == nb_bufs)
 			return nb_bufs;
 	}
-- 
2.7.4


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

* [dpdk-dev] [PATCH 4/5] net/ice: fix dereference after null check coverity
  2019-08-04 21:00 [dpdk-dev] [PATCH 1/5] net/fm10k: fix dereference after null check coverity Xiao Zhang
  2019-08-04 21:00 ` [dpdk-dev] [PATCH 2/5] net/iavf: " Xiao Zhang
  2019-08-04 21:00 ` [dpdk-dev] [PATCH 3/5] net/i40e: " Xiao Zhang
@ 2019-08-04 21:00 ` Xiao Zhang
  2019-08-04 21:00 ` [dpdk-dev] [PATCH 5/5] net/ixgbe: " Xiao Zhang
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-04 21:00 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, qiming.yang, Xiao Zhang, stable

The address of receive queue start segment was not updated when found by
iterated checking, update the address to fix coverity issue.

Coverity issue: 343452
Coverity issue: 343407
Fixes: c68a52b8 ("net/ice: support vector SSE in Rx")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_avx2.c | 1 +
 drivers/net/ice/ice_rxtx_vec_sse.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index fac869a..0b537c6 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -654,6 +654,7 @@ ice_recv_scattered_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts,
 		/* find the first split flag, and only reassemble then*/
 		while (i < nb_bufs && !split_flags[i])
 			i++;
+		rxq->pkt_first_seg = rx_pkts[i];
 		if (i == nb_bufs)
 			return nb_bufs;
 	}
diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index 049f60d..ef502ff 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -507,6 +507,7 @@ ice_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		/* find the first split flag, and only reassemble then*/
 		while (i < nb_bufs && !split_flags[i])
 			i++;
+		rxq->pkt_first_seg = rx_pkts[i];
 		if (i == nb_bufs)
 			return nb_bufs;
 	}
-- 
2.7.4


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

* [dpdk-dev] [PATCH 5/5] net/ixgbe: fix dereference after null check coverity
  2019-08-04 21:00 [dpdk-dev] [PATCH 1/5] net/fm10k: fix dereference after null check coverity Xiao Zhang
                   ` (2 preceding siblings ...)
  2019-08-04 21:00 ` [dpdk-dev] [PATCH 4/5] net/ice: " Xiao Zhang
@ 2019-08-04 21:00 ` Xiao Zhang
  2019-08-05  3:35 ` [dpdk-dev] [PATCH 1/5] net/fm10k: " Ye Xiaolong
  2019-08-05 23:20 ` [dpdk-dev] [v2 0/5] " Xiao Zhang
  5 siblings, 0 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-04 21:00 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, qiming.yang, Xiao Zhang, stable

The address of receive queue start segment was not updated when found by
iterated checking, update the address to fix coverity issue.

Coverity issue: 13245
Fixes: 8a44c15a ("net/ixgbe: extract non-x86 specific code from vector
driver")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index c9ba482..bf38751 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -607,6 +607,7 @@ ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		/* find the first split flag, and only reassemble then*/
 		while (i < nb_bufs && !split_flags[i])
 			i++;
+		rxq->pkt_first_seg = rx_pkts[i];
 		if (i == nb_bufs)
 			return nb_bufs;
 	}
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH 1/5] net/fm10k: fix dereference after null check coverity
  2019-08-04 21:00 [dpdk-dev] [PATCH 1/5] net/fm10k: fix dereference after null check coverity Xiao Zhang
                   ` (3 preceding siblings ...)
  2019-08-04 21:00 ` [dpdk-dev] [PATCH 5/5] net/ixgbe: " Xiao Zhang
@ 2019-08-05  3:35 ` Ye Xiaolong
  2019-08-05 23:20 ` [dpdk-dev] [v2 0/5] " Xiao Zhang
  5 siblings, 0 replies; 16+ messages in thread
From: Ye Xiaolong @ 2019-08-05  3:35 UTC (permalink / raw)
  To: Xiao Zhang; +Cc: dev, beilei.xing, qiming.yang, stable

Hi, Xiao

It's better to have a cover letter for a patch series that contains more than
1 patches, where you can have an overall description of the patchset.

On 08/05, Xiao Zhang wrote:
>The address of receive queue start segment was not updated when found by
>iterated checking, update the address to fix coverity issue.

I suggest to describe more details (dereference after null check) about the
issue other than just say general coverity issue.

>
>Coverity issue: 343416
>Fixes: fe65e1e1 ("fm10k: add vector scatter Rx")
>
>Cc: stable@dpdk.org
>
>Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
>---
> drivers/net/fm10k/fm10k_rxtx_vec.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
>index 788e248..9f2c4ac 100644
>--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
>+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
>@@ -676,6 +676,7 @@ fm10k_recv_scattered_pkts_vec(void *rx_queue,
> 		/* find the first split flag, and only reassemble then*/
> 		while (i < nb_bufs && !split_flags[i])
> 			i++;
>+		rxq->pkt_first_seg = rx_pkts[i];

Minor nit, if i == nb_bufs, above assignment is  meaningless, suggest to move
it after i == nb_bufs check although it doesn't affect the functionality. 
I think it applies for the rest of patches too.

Thanks,
Xiaolong

> 		if (i == nb_bufs)
> 			return nb_bufs;
> 	}
>-- 
>2.7.4
>

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

* Re: [dpdk-dev] [v2 0/5] fix dereference after null check coverity
  2019-08-05 23:20 ` [dpdk-dev] [v2 0/5] " Xiao Zhang
@ 2019-08-05 15:46   ` Ye Xiaolong
  2019-08-06 11:30     ` Zhang, Qi Z
  2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 1/5] net/ixgbe: " Xiao Zhang
                     ` (4 subsequent siblings)
  5 siblings, 1 reply; 16+ messages in thread
From: Ye Xiaolong @ 2019-08-05 15:46 UTC (permalink / raw)
  To: Xiao Zhang; +Cc: dev, qiming.yang, beilei.xing, stable

On 08/06, Xiao Zhang wrote:
>This patch tries to fix (dereference after null check) coverity issue.
>The address of first segmented packets for ice, iavf, i40e fm10k and ixgbe
>was not set correctly during reassembling packets which led to this issue.
>
>Coverity issue: 343452
>Coverity issue: 343407
>Fixes: c68a52b8 ("net/ice: support vector SSE in Rx")
>Coverity issue: 343447
>Fixes: 319c421f ("net/avf: enable SSE Rx Tx")
>Coverity issue: 343422 Coverity issue: 343403
>Fixes: ca74903b ("net/i40e: extract non-x86 specific code from vector driver")
>Coverity issue: 343416
>Fixes: fe65e1e1 ("fm10k: add vector scatter Rx")
>Coverity issue: 13245
>Fixes: 8a44c15a ("net/ixgbe: extract non-x86 specific code from vector driver")
>Cc: stable@dpdk.org
>
>v2 Add cover letter and move the fix after invalidation check
>
>Xiao Zhang (5):
>  net/ixgbe: fix dereference after null check coverity
>  net/ice: fix dereference after null check coverity
>  net/i40e: fix dereference after null check coverity
>  net/iavf: fix dereference after null check coverity
>  net/fm10k: fix dereference after null check coverity
>
> drivers/net/fm10k/fm10k_rxtx_vec.c     | 1 +
> drivers/net/i40e/i40e_rxtx_vec_avx2.c  | 1 +
> drivers/net/i40e/i40e_rxtx_vec_sse.c   | 1 +
> drivers/net/iavf/iavf_rxtx_vec_sse.c   | 1 +
> drivers/net/ice/ice_rxtx_vec_avx2.c    | 1 +
> drivers/net/ice/ice_rxtx_vec_sse.c     | 1 +
> drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 1 +
> 7 files changed, 7 insertions(+)
>
>-- 
>2.7.4
>

For the series:
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

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

* [dpdk-dev] [v2 0/5] fix dereference after null check coverity
  2019-08-04 21:00 [dpdk-dev] [PATCH 1/5] net/fm10k: fix dereference after null check coverity Xiao Zhang
                   ` (4 preceding siblings ...)
  2019-08-05  3:35 ` [dpdk-dev] [PATCH 1/5] net/fm10k: " Ye Xiaolong
@ 2019-08-05 23:20 ` Xiao Zhang
  2019-08-05 15:46   ` Ye Xiaolong
                     ` (5 more replies)
  5 siblings, 6 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-05 23:20 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, beilei.xing, xiaolong.ye, Xiao Zhang, stable

This patch tries to fix (dereference after null check) coverity issue.
The address of first segmented packets for ice, iavf, i40e fm10k and ixgbe
was not set correctly during reassembling packets which led to this issue.

Coverity issue: 343452
Coverity issue: 343407
Fixes: c68a52b8 ("net/ice: support vector SSE in Rx")
Coverity issue: 343447
Fixes: 319c421f ("net/avf: enable SSE Rx Tx")
Coverity issue: 343422 Coverity issue: 343403
Fixes: ca74903b ("net/i40e: extract non-x86 specific code from vector driver")
Coverity issue: 343416
Fixes: fe65e1e1 ("fm10k: add vector scatter Rx")
Coverity issue: 13245
Fixes: 8a44c15a ("net/ixgbe: extract non-x86 specific code from vector driver")
Cc: stable@dpdk.org

v2 Add cover letter and move the fix after invalidation check

Xiao Zhang (5):
  net/ixgbe: fix dereference after null check coverity
  net/ice: fix dereference after null check coverity
  net/i40e: fix dereference after null check coverity
  net/iavf: fix dereference after null check coverity
  net/fm10k: fix dereference after null check coverity

 drivers/net/fm10k/fm10k_rxtx_vec.c     | 1 +
 drivers/net/i40e/i40e_rxtx_vec_avx2.c  | 1 +
 drivers/net/i40e/i40e_rxtx_vec_sse.c   | 1 +
 drivers/net/iavf/iavf_rxtx_vec_sse.c   | 1 +
 drivers/net/ice/ice_rxtx_vec_avx2.c    | 1 +
 drivers/net/ice/ice_rxtx_vec_sse.c     | 1 +
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 1 +
 7 files changed, 7 insertions(+)

-- 
2.7.4


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

* [dpdk-dev] [PATCH v2 1/5] net/ixgbe: fix dereference after null check coverity
  2019-08-05 23:20 ` [dpdk-dev] [v2 0/5] " Xiao Zhang
  2019-08-05 15:46   ` Ye Xiaolong
@ 2019-08-05 23:20   ` Xiao Zhang
  2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 2/5] net/ice: " Xiao Zhang
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-05 23:20 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, beilei.xing, xiaolong.ye, Xiao Zhang, stable

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 13245
Fixes: 8a44c15a ("net/ixgbe: extract non-x86 specific code from vector
driver")

Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index c9ba482..599ba30 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -609,6 +609,7 @@ ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			i++;
 		if (i == nb_bufs)
 			return nb_bufs;
+		rxq->pkt_first_seg = rx_pkts[i];
 	}
 	return i + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
 		&split_flags[i]);
-- 
2.7.4


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

* [dpdk-dev] [PATCH v2 2/5] net/ice: fix dereference after null check coverity
  2019-08-05 23:20 ` [dpdk-dev] [v2 0/5] " Xiao Zhang
  2019-08-05 15:46   ` Ye Xiaolong
  2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 1/5] net/ixgbe: " Xiao Zhang
@ 2019-08-05 23:20   ` Xiao Zhang
  2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 3/5] net/i40e: " Xiao Zhang
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-05 23:20 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, beilei.xing, xiaolong.ye, Xiao Zhang, stable

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343452
Coverity issue: 343407
Fixes: c68a52b8 ("net/ice: support vector SSE in Rx")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_avx2.c | 1 +
 drivers/net/ice/ice_rxtx_vec_sse.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index fac869a..5ce29c2 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -656,6 +656,7 @@ ice_recv_scattered_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts,
 			i++;
 		if (i == nb_bufs)
 			return nb_bufs;
+		rxq->pkt_first_seg = rx_pkts[i];
 	}
 	return i + ice_rx_reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
 					     &split_flags[i]);
diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index 049f60d..967a7b1 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -509,6 +509,7 @@ ice_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			i++;
 		if (i == nb_bufs)
 			return nb_bufs;
+		rxq->pkt_first_seg = rx_pkts[i];
 	}
 	return i + ice_rx_reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
 					     &split_flags[i]);
-- 
2.7.4


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

* [dpdk-dev] [PATCH v2 3/5] net/i40e: fix dereference after null check coverity
  2019-08-05 23:20 ` [dpdk-dev] [v2 0/5] " Xiao Zhang
                     ` (2 preceding siblings ...)
  2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 2/5] net/ice: " Xiao Zhang
@ 2019-08-05 23:20   ` Xiao Zhang
  2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 4/5] net/iavf: " Xiao Zhang
  2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 5/5] net/fm10k: " Xiao Zhang
  5 siblings, 0 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-05 23:20 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, beilei.xing, xiaolong.ye, Xiao Zhang, stable

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343422
Coverity issue: 343403
Fixes: ca74903b ("net/i40e: extract non-x86 specific code from vector
driver")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx_vec_avx2.c | 1 +
 drivers/net/i40e/i40e_rxtx_vec_sse.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
index c4dc990..6f32789 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c
@@ -590,6 +590,7 @@ i40e_recv_scattered_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts,
 			i++;
 		if (i == nb_bufs)
 			return nb_bufs;
+		rxq->pkt_first_seg = rx_pkts[i];
 	}
 	return i + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
 		&split_flags[i]);
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index 3b22588..1fc66b7 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -506,6 +506,7 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			i++;
 		if (i == nb_bufs)
 			return nb_bufs;
+		rxq->pkt_first_seg = rx_pkts[i];
 	}
 	return i + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
 		&split_flags[i]);
-- 
2.7.4


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

* [dpdk-dev] [PATCH v2 4/5] net/iavf: fix dereference after null check coverity
  2019-08-05 23:20 ` [dpdk-dev] [v2 0/5] " Xiao Zhang
                     ` (3 preceding siblings ...)
  2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 3/5] net/i40e: " Xiao Zhang
@ 2019-08-05 23:20   ` Xiao Zhang
  2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 5/5] net/fm10k: " Xiao Zhang
  5 siblings, 0 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-05 23:20 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, beilei.xing, xiaolong.ye, Xiao Zhang, stable

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343447
Fixes: 319c421f ("net/avf: enable SSE Rx Tx")
Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_sse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 3d98514..cc71f23 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -521,6 +521,7 @@ iavf_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			i++;
 		if (i == nb_bufs)
 			return nb_bufs;
+		rxq->pkt_first_seg = rx_pkts[i];
 	}
 	return i + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
 		&split_flags[i]);
-- 
2.7.4


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

* [dpdk-dev] [PATCH v2 5/5] net/fm10k: fix dereference after null check coverity
  2019-08-05 23:20 ` [dpdk-dev] [v2 0/5] " Xiao Zhang
                     ` (4 preceding siblings ...)
  2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 4/5] net/iavf: " Xiao Zhang
@ 2019-08-05 23:20   ` Xiao Zhang
  5 siblings, 0 replies; 16+ messages in thread
From: Xiao Zhang @ 2019-08-05 23:20 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, beilei.xing, xiaolong.ye, Xiao Zhang, stable

This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343416
Fixes: fe65e1e1 ("fm10k: add vector scatter Rx")

Cc: stable@dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/fm10k/fm10k_rxtx_vec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index 788e248..45542be 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -678,6 +678,7 @@ fm10k_recv_scattered_pkts_vec(void *rx_queue,
 			i++;
 		if (i == nb_bufs)
 			return nb_bufs;
+		rxq->pkt_first_seg = rx_pkts[i];
 	}
 	return i + fm10k_reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
 		&split_flags[i]);
-- 
2.7.4


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

* Re: [dpdk-dev] [v2 0/5] fix dereference after null check coverity
  2019-08-05 15:46   ` Ye Xiaolong
@ 2019-08-06 11:30     ` Zhang, Qi Z
  2019-08-06 14:01       ` Ye Xiaolong
  0 siblings, 1 reply; 16+ messages in thread
From: Zhang, Qi Z @ 2019-08-06 11:30 UTC (permalink / raw)
  To: Ye, Xiaolong, Zhang, Xiao; +Cc: dev, Yang, Qiming, Xing, Beilei, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ye Xiaolong
> Sent: Monday, August 5, 2019 11:46 PM
> To: Zhang, Xiao <xiao.zhang@intel.com>
> Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [v2 0/5] fix dereference after null check coverity
> 
> On 08/06, Xiao Zhang wrote:
> >This patch tries to fix (dereference after null check) coverity issue.
> >The address of first segmented packets for ice, iavf, i40e fm10k and
> >ixgbe was not set correctly during reassembling packets which led to this
> issue.
> >
> >Coverity issue: 343452
> >Coverity issue: 343407
> >Fixes: c68a52b8 ("net/ice: support vector SSE in Rx") Coverity issue:
> >343447
> >Fixes: 319c421f ("net/avf: enable SSE Rx Tx") Coverity issue: 343422
> >Coverity issue: 343403
> >Fixes: ca74903b ("net/i40e: extract non-x86 specific code from vector
> >driver") Coverity issue: 343416
> >Fixes: fe65e1e1 ("fm10k: add vector scatter Rx") Coverity issue: 13245
> >Fixes: 8a44c15a ("net/ixgbe: extract non-x86 specific code from vector
> >driver")

Fix tag size should be 12

> >Cc: stable@dpdk.org
> >
> >v2 Add cover letter and move the fix after invalidation check
> >
> >Xiao Zhang (5):
> >  net/ixgbe: fix dereference after null check coverity
> >  net/ice: fix dereference after null check coverity
> >  net/i40e: fix dereference after null check coverity
> >  net/iavf: fix dereference after null check coverity
> >  net/fm10k: fix dereference after null check coverity
> >
> > drivers/net/fm10k/fm10k_rxtx_vec.c     | 1 +
> > drivers/net/i40e/i40e_rxtx_vec_avx2.c  | 1 +
> > drivers/net/i40e/i40e_rxtx_vec_sse.c   | 1 +
> > drivers/net/iavf/iavf_rxtx_vec_sse.c   | 1 +
> > drivers/net/ice/ice_rxtx_vec_avx2.c    | 1 +
> > drivers/net/ice/ice_rxtx_vec_sse.c     | 1 +
> > drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 1 +
> > 7 files changed, 7 insertions(+)
> >
> >--
> >2.7.4
> >
> 
> For the series:
> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel with fix tag fix

Thanks
Qi

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

* Re: [dpdk-dev] [v2 0/5] fix dereference after null check coverity
  2019-08-06 11:30     ` Zhang, Qi Z
@ 2019-08-06 14:01       ` Ye Xiaolong
  2019-08-06 14:13         ` Zhang, Xiao
  0 siblings, 1 reply; 16+ messages in thread
From: Ye Xiaolong @ 2019-08-06 14:01 UTC (permalink / raw)
  To: Zhang, Xiao, Zhang, Qi Z; +Cc: dev, Yang, Qiming, Xing, Beilei, stable

Hi, Xiao

On 08/06, Zhang, Qi Z wrote:
>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ye Xiaolong
>> Sent: Monday, August 5, 2019 11:46 PM
>> To: Zhang, Xiao <xiao.zhang@intel.com>
>> Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Xing, Beilei
>> <beilei.xing@intel.com>; stable@dpdk.org
>> Subject: Re: [dpdk-dev] [v2 0/5] fix dereference after null check coverity
>> 
>> On 08/06, Xiao Zhang wrote:
>> >This patch tries to fix (dereference after null check) coverity issue.
>> >The address of first segmented packets for ice, iavf, i40e fm10k and
>> >ixgbe was not set correctly during reassembling packets which led to this
>> issue.
>> >
>> >Coverity issue: 343452
>> >Coverity issue: 343407
>> >Fixes: c68a52b8 ("net/ice: support vector SSE in Rx") Coverity issue:
>> >343447
>> >Fixes: 319c421f ("net/avf: enable SSE Rx Tx") Coverity issue: 343422
>> >Coverity issue: 343403
>> >Fixes: ca74903b ("net/i40e: extract non-x86 specific code from vector
>> >driver") Coverity issue: 343416
>> >Fixes: fe65e1e1 ("fm10k: add vector scatter Rx") Coverity issue: 13245
>> >Fixes: 8a44c15a ("net/ixgbe: extract non-x86 specific code from vector
>> >driver")
>
>Fix tag size should be 12

You can add below alias section to you git config file to create proper fix tag conveniently.

[alias]
        fixline = log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae'


Thanks,
Xiaolong

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

* Re: [dpdk-dev] [v2 0/5] fix dereference after null check coverity
  2019-08-06 14:01       ` Ye Xiaolong
@ 2019-08-06 14:13         ` Zhang, Xiao
  0 siblings, 0 replies; 16+ messages in thread
From: Zhang, Xiao @ 2019-08-06 14:13 UTC (permalink / raw)
  To: Ye, Xiaolong, Zhang, Qi Z; +Cc: dev, Yang, Qiming, Xing, Beilei, stable

Got it. Thanks Xiaolong and Qi.

> -----Original Message-----
> From: Ye, Xiaolong
> Sent: Tuesday, August 6, 2019 10:01 PM
> To: Zhang, Xiao <xiao.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [v2 0/5] fix dereference after null check coverity
> 
> Hi, Xiao
> 
> On 08/06, Zhang, Qi Z wrote:
> >
> >
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ye Xiaolong
> >> Sent: Monday, August 5, 2019 11:46 PM
> >> To: Zhang, Xiao <xiao.zhang@intel.com>
> >> Cc: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Xing, Beilei
> >> <beilei.xing@intel.com>; stable@dpdk.org
> >> Subject: Re: [dpdk-dev] [v2 0/5] fix dereference after null check
> >> coverity
> >>
> >> On 08/06, Xiao Zhang wrote:
> >> >This patch tries to fix (dereference after null check) coverity issue.
> >> >The address of first segmented packets for ice, iavf, i40e fm10k and
> >> >ixgbe was not set correctly during reassembling packets which led to
> >> >this
> >> issue.
> >> >
> >> >Coverity issue: 343452
> >> >Coverity issue: 343407
> >> >Fixes: c68a52b8 ("net/ice: support vector SSE in Rx") Coverity issue:
> >> >343447
> >> >Fixes: 319c421f ("net/avf: enable SSE Rx Tx") Coverity issue: 343422
> >> >Coverity issue: 343403
> >> >Fixes: ca74903b ("net/i40e: extract non-x86 specific code from
> >> >vector
> >> >driver") Coverity issue: 343416
> >> >Fixes: fe65e1e1 ("fm10k: add vector scatter Rx") Coverity issue:
> >> >13245
> >> >Fixes: 8a44c15a ("net/ixgbe: extract non-x86 specific code from
> >> >vector
> >> >driver")
> >
> >Fix tag size should be 12
> 
> You can add below alias section to you git config file to create proper fix tag
> conveniently.
> 
> [alias]
>         fixline = log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae'
> 
> 
> Thanks,
> Xiaolong

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

end of thread, other threads:[~2019-08-06 14:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-04 21:00 [dpdk-dev] [PATCH 1/5] net/fm10k: fix dereference after null check coverity Xiao Zhang
2019-08-04 21:00 ` [dpdk-dev] [PATCH 2/5] net/iavf: " Xiao Zhang
2019-08-04 21:00 ` [dpdk-dev] [PATCH 3/5] net/i40e: " Xiao Zhang
2019-08-04 21:00 ` [dpdk-dev] [PATCH 4/5] net/ice: " Xiao Zhang
2019-08-04 21:00 ` [dpdk-dev] [PATCH 5/5] net/ixgbe: " Xiao Zhang
2019-08-05  3:35 ` [dpdk-dev] [PATCH 1/5] net/fm10k: " Ye Xiaolong
2019-08-05 23:20 ` [dpdk-dev] [v2 0/5] " Xiao Zhang
2019-08-05 15:46   ` Ye Xiaolong
2019-08-06 11:30     ` Zhang, Qi Z
2019-08-06 14:01       ` Ye Xiaolong
2019-08-06 14:13         ` Zhang, Xiao
2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 1/5] net/ixgbe: " Xiao Zhang
2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 2/5] net/ice: " Xiao Zhang
2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 3/5] net/i40e: " Xiao Zhang
2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 4/5] net/iavf: " Xiao Zhang
2019-08-05 23:20   ` [dpdk-dev] [PATCH v2 5/5] net/fm10k: " Xiao Zhang

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).