patch 'common/dpaax: fix physical address conversion' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:34:20 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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://github.com/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/7440bbb9450bdd51eff05de14fc18f430eade6f8

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 7440bbb9450bdd51eff05de14fc18f430eade6f8 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh at nxp.com>
Date: Wed, 6 Oct 2021 22:31:31 +0530
Subject: [PATCH] common/dpaax: fix physical address conversion

[ upstream commit c5e6bc12a319d4500d931ca84d4227e4d7495956 ]

If some of the VA entries of table are somehow not populated and are
NULL, it can add offset to NULL and return the invalid VA in PA to
VA conversion.

In this patch, adding a check if the VA entry has valid address only
then add offset and return VA.

Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Gagandeep Singh <g.singh at nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta at nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
 drivers/common/dpaax/dpaax_iova_table.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/common/dpaax/dpaax_iova_table.h b/drivers/common/dpaax/dpaax_iova_table.h
index fef97f6dde..599f5b842b 100644
--- a/drivers/common/dpaax/dpaax_iova_table.h
+++ b/drivers/common/dpaax/dpaax_iova_table.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018 NXP
+ * Copyright 2018-2021 NXP
  */
 
 #ifndef _DPAAX_IOVA_TABLE_H_
@@ -97,6 +97,12 @@ dpaax_iova_table_get_va(phys_addr_t paddr) {
 
 		/* paddr > entry->start && paddr <= entry->(start+len) */
 		index = (paddr_align - entry[i].start)/DPAAX_MEM_SPLIT;
+		/* paddr is within range, but no vaddr entry ever written
+		 * at index
+		 */
+		if ((void *)(uintptr_t)entry[i].pages[index] == NULL)
+			return NULL;
+
 		vaddr = (void *)((uintptr_t)entry[i].pages[index] + offset);
 		break;
 	} while (1);
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:09.291226713 +0100
+++ 0056-common-dpaax-fix-physical-address-conversion.patch	2021-11-30 16:50:05.706872913 +0100
@@ -1 +1 @@
-From c5e6bc12a319d4500d931ca84d4227e4d7495956 Mon Sep 17 00:00:00 2001
+From 7440bbb9450bdd51eff05de14fc18f430eade6f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c5e6bc12a319d4500d931ca84d4227e4d7495956 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 230fba8ba0..b1f2300c52 100644
+index fef97f6dde..599f5b842b 100644
@@ -34 +35 @@
-@@ -101,6 +101,12 @@ dpaax_iova_table_get_va(phys_addr_t paddr) {
+@@ -97,6 +97,12 @@ dpaax_iova_table_get_va(phys_addr_t paddr) {


More information about the stable mailing list