All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: imx_rproc: Fix off-by-one in address translation
@ 2026-07-30  3:12 Peng Fan (OSS)
  2026-07-30  3:21 ` sashiko-bot
  2026-07-30  3:25 ` Peng Fan
  0 siblings, 2 replies; 3+ messages in thread
From: Peng Fan (OSS) @ 2026-07-30  3:12 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: linux-remoteproc, imx, linux-arm-kernel, linux-kernel, Peng Fan,
	Sashiko

From: Peng Fan <peng.fan@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@kernel.org>
Closes: https://lore.kernel.org/all/20260729013506.584321F000E9@smtp.kernel.org/
Signed-off-by: Peng Fan <peng.fan@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@nxp.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-30  3:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30  3:12 [PATCH] remoteproc: imx_rproc: Fix off-by-one in address translation Peng Fan (OSS)
2026-07-30  3:21 ` sashiko-bot
2026-07-30  3:25 ` Peng Fan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.