Skip to content

remoteproc: ti_k3: fix DA to VA bounds checks

Atul Akella u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2remoteproc: ti_k3_dsp: make bounds check overflow safedrivers/remoteproc/ti_k3_dsp_rproc.c+7 -50 replies
2/2remoteproc: ti_k3_m4: make bounds check overflow safedrivers/remoteproc/ti_k3_m4_rproc.c+11 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] remoteproc: ti_k3: fix DA to VA bounds checks

The TI K3 DSP and M4 remoteproc drivers use addition based range checks in their DA to VA callbacks. These checks can overflow when evaluating the requested address range or the end of a memory region.

Replace them with subtraction based checks. Verify that the requested address is not below the region base, calculate its offset, and check that the requested length fits within the remaining region size.

Use u64 for the offset to avoid truncating wider address offsets. Both drivers are updated in the same way while preserving their existing mapping and return behavior.

Atul Akella (2):
remoteproc: ti_k3_dsp: make bounds check overflow safe
remoteproc: ti_k3_m4: make bounds check overflow safe

 drivers/remoteproc/ti_k3_dsp_rproc.c | 12 +++++++-----
 drivers/remoteproc/ti_k3_m4_rproc.c  | 18 +++++++++++-------
 2 files changed, 18 insertions(+), 12 deletions(-)
Signature · 1 line
2.43.0