]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
accel/amdxdna: Fix clflush buffer size
authorLizhi Hou <lizhi.hou@amd.com>
Thu, 7 May 2026 04:02:07 +0000 (21:02 -0700)
committerLizhi Hou <lizhi.hou@amd.com>
Thu, 7 May 2026 21:07:34 +0000 (14:07 -0700)
commitada61841caede131cc626f6cd28a60904296f248
tree0d6daf45f0ba3697850e05aa3e80fe49938d643f
parent55bd5e685bda455b9b50c835f8c8442d52a344a3
accel/amdxdna: Fix clflush buffer size

The firmware is told the buffer is req.buf_size bytes. It may read/write
the entire region. If the CPU only flushes a subset, the remaining cache
lines could contain stale data, causing the device to see garbage.

Fixes: 6e87001fe19f ("accel/amdxdna: Adjust size for copy_to_user()")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260507040207.178111-1-lizhi.hou@amd.com
drivers/accel/amdxdna/aie2_message.c