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/fm10k: fix memory overflow in 32-bit SSE Rx' has been queued to LTS release 16.11.2
Date: Mon, 8 May 2017 13:40:21 +0800 [thread overview]
Message-ID: <1494222024-5222-9-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 81ea8e49fdcada184cbc0823ccad125740aa4c22 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Sun, 30 Apr 2017 01:26:51 -0400
Subject: [PATCH] net/fm10k: fix memory overflow in 32-bit SSE Rx
[ upstream commit 70fca51612722ed686d5565700717384b8f52887 ]
Return mbuf points of _recv_raw_pkts_vec are modified out of bound.
Fixes: a6ce64a97520 ("fm10k: introduce vector driver")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/fm10k/fm10k_rxtx_vec.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index 27f3e43..3d21652 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -470,9 +470,13 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
__m128i descs0[RTE_FM10K_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. */
+ __m128i mbp1;
+ /* 2 64 bit or 4 32 bit mbuf pointers in one XMM reg. */
+#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 *)&mbufp[pos]);
/* Read desc statuses backwards to avoid race condition */
@@ -480,11 +484,13 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
descs0[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 poitns */
mbp2 = _mm_loadu_si128((__m128i *)&mbufp[pos+2]);
+#endif
descs0[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
rte_compiler_barrier();
@@ -493,8 +499,10 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
rte_compiler_barrier();
descs0[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
/* avoid compiler reorder optimization */
rte_compiler_barrier();
--
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 ` [dpdk-stable] patch 'net/ixgbe: fix memory overflow in 32-bit SSE Rx' " Yuanhan Liu
2017-05-08 5:40 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
2017-05-08 5:40 ` Yuanhan Liu [this message]
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-9-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).