From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Qi Zhang <qi.z.zhang@intel.com>
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/ixgbe: fix memory overflow in 32-bit SSE Rx' has been queued to LTS release 16.11.2
Date: Mon, 8 May 2017 13:40:19 +0800 [thread overview]
Message-ID: <1494222024-5222-7-git-send-email-yuanhan.liu@linux.intel.com> (raw)
In-Reply-To: <1494222024-5222-1-git-send-email-yuanhan.liu@linux.intel.com>
Hi,
FYI, your patch has been queued to LTS release 16.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
yet. It will be pushed if I get no objections before 05/13/17.
So please shout if anyone has objections.
Thanks.
--yliu
---
>From ad146b8ea41aa3bcda6e34860e56485608219989 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Sun, 30 Apr 2017 01:26:50 -0400
Subject: [PATCH] net/ixgbe: fix memory overflow in 32-bit SSE Rx
[ upstream commit 6d65eba145cc3d84d9d0de1824eacfa2392a5eee ]
Return mbuf points of _recv_raw_pkts_vec are modified out of bound.
Fixes: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index abbf284..dd7d177 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -335,9 +335,13 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
__m128i descs[RTE_IXGBE_DESCS_PER_LOOP];
__m128i pkt_mb1, pkt_mb2, pkt_mb3, pkt_mb4;
__m128i zero, staterr, sterr_tmp1, sterr_tmp2;
- __m128i mbp1, mbp2; /* two mbuf pointer in one XMM reg. */
+ /* 2 64 bit or 4 32 bit mbuf pointers in one XMM reg. */
+ __m128i mbp1;
+#if defined(RTE_ARCH_X86_64)
+ __m128i mbp2;
+#endif
- /* B.1 load 1 mbuf point */
+ /* B.1 load 2 (64 bit) or 4 (32 bit) mbuf points */
mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]);
/* Read desc statuses backwards to avoid race condition */
@@ -345,11 +349,13 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
rte_compiler_barrier();
- /* B.2 copy 2 mbuf point into rx_pkts */
+ /* B.2 copy 2 64 bit or 4 32 bit mbuf point into rx_pkts */
_mm_storeu_si128((__m128i *)&rx_pkts[pos], mbp1);
- /* B.1 load 1 mbuf point */
+#if defined(RTE_ARCH_X86_64)
+ /* B.1 load 2 64 bit mbuf points */
mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos+2]);
+#endif
descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
rte_compiler_barrier();
@@ -358,8 +364,10 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
rte_compiler_barrier();
descs[0] = _mm_loadu_si128((__m128i *)(rxdp));
+#if defined(RTE_ARCH_X86_64)
/* B.2 copy 2 mbuf point into rx_pkts */
_mm_storeu_si128((__m128i *)&rx_pkts[pos+2], mbp2);
+#endif
if (split_packet) {
rte_mbuf_prefetch_part2(rx_pkts[pos]);
--
1.9.0
next prev parent reply other threads:[~2017-05-08 5:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-08 5:40 [dpdk-stable] patch 'kni: fix crash caused by freeing mempool' " Yuanhan Liu
2017-05-08 5:40 ` [dpdk-stable] patch 'net: fix stripped VLAN flag for offload emulation' " Yuanhan Liu
2017-05-08 5:40 ` [dpdk-stable] patch 'net/igb: fix VF MAC address setting' " Yuanhan Liu
2017-05-08 5:40 ` Yuanhan Liu
2017-05-08 5:40 ` [dpdk-stable] patch 'net/ixgbe: fix VF Rx mode for allmulticast disabled' " Yuanhan Liu
2017-05-08 5:40 ` [dpdk-stable] patch 'net/ixgbe: fix setting MTU on stopped device' " Yuanhan Liu
2017-05-08 5:40 ` Yuanhan Liu [this message]
2017-05-08 5:40 ` [dpdk-stable] patch 'net/i40e: fix memory overflow in 32-bit SSE Rx' " Yuanhan Liu
2017-05-08 5:40 ` [dpdk-stable] patch 'net/fm10k: " Yuanhan Liu
2017-05-08 5:40 ` [dpdk-stable] patch 'net/vmxnet3: fix build with gcc 7' " Yuanhan Liu
2017-05-08 5:40 ` [dpdk-stable] patch 'doc: explain zlib dependency for bnx2x' " Yuanhan Liu
2017-05-08 5:40 ` [dpdk-stable] patch 'test/cmdline: fix missing break in switch' " Yuanhan Liu
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=1494222024-5222-7-git-send-email-yuanhan.liu@linux.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=qi.z.zhang@intel.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).