linux/drivers/accel/ethosu
Rob Herring (Arm) 2b39d680c9 accel: ethosu: Ensure SRAM region size matches job
It is possible for userspace to set the job SRAM size to 0, but then still
have SRAM accesses in the command stream. When the job SRAM size is 0,
setting the region base register is skipped and a stale base address from
a prior job is used.

Check the region size against the job's SRAM size instead of just the size
of the SRAM. The job's SRAM size was already checked against the total SRAM
size.

Fixes: 9cff907748 ("accel: ethosu: Validate SRAM size on submit")
Cc: stable@vger.kernel.org
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260827-ethosu-fixes-v1-5-346f9ea8791c@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2026-09-03 12:06:45 -05:00
..
ethosu_device.h accel: ethosu: Ensure cmd stream ends with a stop op 2026-09-03 12:06:45 -05:00
ethosu_drv.c accel: ethosu: Ensure SRAM size is 0 on mapping failure 2026-09-03 12:06:45 -05:00
ethosu_drv.h accel: ethosu: Add performance counter support 2026-06-01 19:44:24 +02:00
ethosu_gem.c accel: ethosu: Ensure cmd stream ends with a stop op 2026-09-03 12:06:45 -05:00
ethosu_gem.h
ethosu_job.c accel: ethosu: Ensure SRAM region size matches job 2026-09-03 12:06:45 -05:00
ethosu_job.h accel: ethosu: Add performance counter support 2026-06-01 19:44:24 +02:00
ethosu_perfmon.c accel: ethosu: Add performance counter support 2026-06-01 19:44:24 +02:00
Kconfig accel: ethosu: Add hardware dependency hint 2026-04-02 15:18:14 -05:00
Makefile accel: ethosu: Add performance counter support 2026-06-01 19:44:24 +02:00