RE: [PATCH] remoteproc: imx_rproc: Fix off-by-one in address translation
From: Peng Fan
Date: Wed Jul 29 2026 - 23:26:21 EST
> Subject: [PATCH] remoteproc: imx_rproc: Fix off-by-one in address
> translation
Ignore this patch. The fix is not complete.
Thanks,
Peng.
>
> From: Peng Fan <peng.fan@xxxxxxx>
>
> 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@xxxxxxxxxx>
> Closes:
> https://lore.kernel.org/all/20260729013506.584321F000E9@xxxxxxxx
> nel.org/
> Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
> ---
> 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@xxxxxxx>