[PATCH] remoteproc: imx_rproc: Fix off-by-one in address translation
"Peng Fan (OSS)" <[email protected]> Thu, 30 Jul 2026 11:12:49 +0800
| Newsgroups | org.kernel.vger.linux-remoteproc,dev.linux.lists.imx,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
From: Peng Fan <[email protected]> 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 <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Peng Fan <[email protected]> --- 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 <[email protected]>