mirror-linux/drivers/accel
Karol Wachowski 2359fe9313 accel/ivpu: Validate scatter-gather size against buffer size
Validate scatter-gather table size matches buffer object size before
mapping. Break mapping early if the table exceeds buffer size to
prevent overwriting existing mappings. Also validate the table is
not smaller than buffer size to avoid unmapped regions that trigger
MMU translation faults.

Log error and fail mapping operation on size mismatch to prevent
data corruption from mismatched host memory locations and NPU
addresses. Unmap any partially mapped buffer on failure.

Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://patch.msgid.link/20251215070933.520377-1-karol.wachowski@linux.intel.com
2025-12-16 08:10:19 +01:00
..
amdxdna accel/amdxdna: Fix potential NULL pointer dereference in context cleanup 2025-12-15 09:52:59 -08:00
ethosu drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
habanalabs accel/habanalabs: add Infineon version check 2025-09-25 09:14:45 +03:00
ivpu accel/ivpu: Validate scatter-gather size against buffer size 2025-12-16 08:10:19 +01:00
qaic accel/qaic: Add qaic_ prefix to irq_polling_work 2025-11-07 11:27:46 -07:00
rocket drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
Kconfig accel: Add Arm Ethos-U NPU driver 2025-10-24 15:07:39 -05:00
Makefile accel: Add Arm Ethos-U NPU driver 2025-10-24 15:07:39 -05:00
drm_accel.c drm: move drm based debugfs funcs to drm_debugfs.c 2025-07-04 15:58:22 +02:00