[PATCH 09/10] remoteproc: imx_dsp_rproc: Fix pointer stride in imx_dsp_rproc_memset()
Peng Fan (OSS)
peng.fan at oss.nxp.com
Mon Nov 23 19:25:56 PST 2026
On Mon, 23 Nov 2026 17:20:53 +0000 Lee Jones <lee at kernel.org> wrote:
> Commit 3c497f624d40 ("remoteproc: imx_dsp_rproc: Fix kernel test robot
> sparse warning") changed tmp_dst from u32 * to void __iomem *. In GNU
> C, incrementing a void pointer advances it by 1 byte rather than 4
> bytes. Consequently, the word-fill loop in imx_dsp_rproc_memset()
> steps by 1 byte per 32-bit writel(), triggering unaligned 32-bit MMIO
> accesses on Device-mapped DSP IRAM, mispositioning tmp_dst for the
> trailing-byte read-modify-write, and leaving roughly three quarters of
> the target region uninitialised.
>
> Advance tmp_dst by 4 bytes per 32-bit word write.
>
> Fixes: 3c497f624d40 ("remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning")
> Closes: https://sashiko.dev/#/bug/linux-720f943f-eefd-4df7-806e-0b50cad1abbe
> Cc: stable at vger.kernel.org
> Signed-off-by: Lee Jones <lee at kernel.org>
Reviewed-by: Peng Fan <peng.fan at nxp.com>
More information about the linux-arm-kernel
mailing list