summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorSidong Yang <sidong.yang@furiosa.ai>2026-10-05 01:47:27 +0900
committerHeiko Stuebner <heiko@sntech.de>2026-10-12 23:15:48 +0200
commit725953d4da85cfb97a4c309fad6346b72f8529e7 (patch)
tree765a4dc61c508fd054d9a6bb95fc0bc0cc3b65f4 /include/linux/debugobjects.h
parentf31a7b1f277d64f0d0d5907e13b69fe01a0bd250 (diff)
accel/rocket: Validate task regcmd address and count on submission
The regcmd fields in drm_rocket_task come from userspace and are programmed into the PC unit without any validation. Bits 31:4 of PC_BASE_ADDRESS hold the register command DMA address and bit 0 selects slave mode, so a misaligned regcmd silently drops its low bits, and an odd address flips the PC unit into slave mode. Similarly, pc_data_amount is a 16-bit field holding (regcmd_count + 1) / 2 - 1, so a larger regcmd_count is silently truncated by the register encoding. Reject unaligned regcmd addresses and out-of-range regcmd_count with -EINVAL at submission time. Existing userspace is not affected: Mesa places regcmd buffers at 64-byte aligned offsets, and its regcmd counts stay far below the limit. Signed-off-by: Sidong Yang <sidong.yang@furiosa.ai> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid.link/20261004164727.466164-4-sidong.yang@furiosa.ai
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions