[PATCH] remoteproc: imx_rproc: Fix off-by-one in address translation
Peng Fan (OSS)
peng.fan at oss.nxp.com
Wed Jul 29 20:12:49 PDT 2026
From: Peng Fan <peng.fan at nxp.com>
In imx_rproc_da_to_sys(), a firmware segment that exactly fills the
remainder of a memory region (da + len == att->da + att->size) is
wrongly rejected due to a strict less-than comparison. Use <= to
accept this valid boundary case.
Reported-by: Sashiko <sashiko-bot at kernel.org>
Closes: https://lore.kernel.org/all/20260729013506.584321F000E9@smtp.kernel.org/
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
drivers/remoteproc/imx_rproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 745ce52cd8226..9af0aa26ce9b7 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -552,7 +552,7 @@ static int imx_rproc_da_to_sys(struct imx_rproc *priv, u64 da,
continue;
}
- if (da >= att->da && da + len < att->da + att->size) {
+ if (da >= att->da && da + len <= att->da + att->size) {
unsigned int offset = da - att->da;
*sys = att->sa + offset;
---
base-commit: 3652b49adac266a3d27cb41cdfdb7d8790fc3633
change-id: 20260729-imx-rproc-range-6383734aff49
Best regards,
--
Peng Fan <peng.fan at nxp.com>
More information about the linux-arm-kernel
mailing list