* [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes
@ 2018-12-14 19:01 Rahul Lakkireddy
2018-12-14 19:01 ` [dpdk-dev] [PATCH 1/2] net/cxgbe: fix overlapping regions in TID table Rahul Lakkireddy
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rahul Lakkireddy @ 2018-12-14 19:01 UTC (permalink / raw)
To: dev; +Cc: nirranjan, indranil
Patch 1 fixes memory corruption due to overlapping regions in TID table.
Patch 2 fixes NULL pointer dereference when attempting to parse pattern
match items without any spec.
Thanks,
Rahul
Rahul Lakkireddy (2):
net/cxgbe: fix overlapping regions in TID table
net/cxgbe: skip parsing match items with no spec
drivers/net/cxgbe/cxgbe_flow.c | 4 ++++
drivers/net/cxgbe/cxgbe_main.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
--
2.18.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH 1/2] net/cxgbe: fix overlapping regions in TID table
2018-12-14 19:01 [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes Rahul Lakkireddy
@ 2018-12-14 19:01 ` Rahul Lakkireddy
2018-12-14 19:01 ` [dpdk-dev] [PATCH 2/2] net/cxgbe: skip parsing match items with no spec Rahul Lakkireddy
2018-12-18 18:39 ` [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes Ferruh Yigit
2 siblings, 0 replies; 4+ messages in thread
From: Rahul Lakkireddy @ 2018-12-14 19:01 UTC (permalink / raw)
To: dev; +Cc: nirranjan, indranil, stable
Location of filter TID table should be after active TID table memory,
and not from the beginning of TID table memory. This fixes memory
corruption due to overlapping regions.
Fixes: 3a381a4116ed ("net/cxgbe: query firmware for HASH filter resources")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
drivers/net/cxgbe/cxgbe_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 0368db509..5fa6cdd05 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -415,7 +415,7 @@ static int tid_init(struct tid_info *t)
return -ENOMEM;
t->atid_tab = (union aopen_entry *)&t->tid_tab[t->ntids];
- t->ftid_tab = (struct filter_entry *)&t->tid_tab[t->natids];
+ t->ftid_tab = (struct filter_entry *)&t->atid_tab[t->natids];
t->ftid_bmap_array = t4_os_alloc(ftid_bmap_size);
if (!t->ftid_bmap_array) {
tid_free(t);
--
2.18.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH 2/2] net/cxgbe: skip parsing match items with no spec
2018-12-14 19:01 [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes Rahul Lakkireddy
2018-12-14 19:01 ` [dpdk-dev] [PATCH 1/2] net/cxgbe: fix overlapping regions in TID table Rahul Lakkireddy
@ 2018-12-14 19:01 ` Rahul Lakkireddy
2018-12-18 18:39 ` [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes Ferruh Yigit
2 siblings, 0 replies; 4+ messages in thread
From: Rahul Lakkireddy @ 2018-12-14 19:01 UTC (permalink / raw)
To: dev; +Cc: nirranjan, indranil, stable
Skip parsing pattern match items that have no spec. This fixes NULL
dereference when accessing their non-existent spec.
Fixes: ee61f5113b17 ("net/cxgbe: parse and validate flows")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
drivers/net/cxgbe/cxgbe_flow.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 4deaff8f2..7b87bdf58 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -732,6 +732,10 @@ cxgbe_rtef_parse_items(struct rte_flow *flow,
"parse items cannot be repeated (except void)");
repeat[i->type] = 1;
+ /* No spec found for this pattern item. Skip it */
+ if (!i->spec)
+ break;
+
/* validate the item */
ret = cxgbe_validate_item(i, e);
if (ret)
--
2.18.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes
2018-12-14 19:01 [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes Rahul Lakkireddy
2018-12-14 19:01 ` [dpdk-dev] [PATCH 1/2] net/cxgbe: fix overlapping regions in TID table Rahul Lakkireddy
2018-12-14 19:01 ` [dpdk-dev] [PATCH 2/2] net/cxgbe: skip parsing match items with no spec Rahul Lakkireddy
@ 2018-12-18 18:39 ` Ferruh Yigit
2 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2018-12-18 18:39 UTC (permalink / raw)
To: Rahul Lakkireddy, dev; +Cc: nirranjan, indranil
On 12/14/2018 7:01 PM, Rahul Lakkireddy wrote:
> Patch 1 fixes memory corruption due to overlapping regions in TID table.
> Patch 2 fixes NULL pointer dereference when attempting to parse pattern
> match items without any spec.
>
> Thanks,
> Rahul
>
> Rahul Lakkireddy (2):
> net/cxgbe: fix overlapping regions in TID table
> net/cxgbe: skip parsing match items with no spec
Series applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-18 18:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14 19:01 [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes Rahul Lakkireddy
2018-12-14 19:01 ` [dpdk-dev] [PATCH 1/2] net/cxgbe: fix overlapping regions in TID table Rahul Lakkireddy
2018-12-14 19:01 ` [dpdk-dev] [PATCH 2/2] net/cxgbe: skip parsing match items with no spec Rahul Lakkireddy
2018-12-18 18:39 ` [dpdk-dev] [PATCH 0/2] net/cxgbe: rte_flow related bug fixes Ferruh Yigit
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).