patch 'bus/dpaa: fix build with asserts for GCC 13' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Sun Oct 22 16:20:49 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/15/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=e55de889b7ffc4b604b4dd05f62b93cbdc8cd298

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From e55de889b7ffc4b604b4dd05f62b93cbdc8cd298 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh at nxp.com>
Date: Fri, 21 Jul 2023 10:58:10 +0530
Subject: [PATCH] bus/dpaa: fix build with asserts for GCC 13
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 3bcd5b3198d4a31176b1ac73fc7236a12186fffe ]

when RTE_ENABLE_ASSERT is enable, DPAA driver is doing
wrong NULL check on frame queue which allows the code
to have access to NULL address.
GCC v13 is giving array bounds error if code is
accessing any memory region less than 4KB.
This patch fixes this issue by adding proper NULL checks
on frame queue.

Bugzilla ID: 1233
Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines")

Signed-off-by: Gagandeep Singh <g.singh at nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
---
 drivers/bus/dpaa/base/qbman/qman.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 3949bf8712..83db0a534e 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
  *
  * Copyright 2008-2016 Freescale Semiconductor Inc.
- * Copyright 2017,2019 NXP
+ * Copyright 2017,2019-2023 NXP
  *
  */

@@ -897,7 +897,7 @@ mr_loop:
 				/* Lookup in the retirement table */
 				fq = table_find_fq(p,
 						   be32_to_cpu(msg->fq.fqid));
-				DPAA_BUG_ON(!fq);
+				DPAA_BUG_ON(fq != NULL);
 				fq_state_change(p, fq, &swapped_msg, verb);
 				if (fq->cb.fqs)
 					fq->cb.fqs(p, fq, &swapped_msg);
@@ -909,6 +909,7 @@ mr_loop:
 #else
 				fq = (void *)(uintptr_t)msg->fq.contextB;
 #endif
+				DPAA_BUG_ON(fq != NULL);
 				fq_state_change(p, fq, msg, verb);
 				if (fq->cb.fqs)
 					fq->cb.fqs(p, fq, &swapped_msg);
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-10-22 22:17:35.181718800 +0800
+++ 0020-bus-dpaa-fix-build-with-asserts-for-GCC-13.patch	2023-10-22 22:17:34.156723700 +0800
@@ -1 +1 @@
-From 3bcd5b3198d4a31176b1ac73fc7236a12186fffe Mon Sep 17 00:00:00 2001
+From e55de889b7ffc4b604b4dd05f62b93cbdc8cd298 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 3bcd5b3198d4a31176b1ac73fc7236a12186fffe ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list