summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorZack Rusin <zack.rusin@broadcom.com>2026-10-27 02:08:24 -0400
committerZack Rusin <zack.rusin@broadcom.com>2026-11-16 15:09:33 -0500
commit6baeb251d709d5f31f2a0ae89ca5ca054d0e04e7 (patch)
tree82883a40637ee0b60d8f1187ac3b603159f58f1f /rust/kernel/alloc
parent556271f0ade9d3f1ed0a386f29d3363be294c1fc (diff)
drm/vmwgfx: validate GB-only cursor command limits
Guest-backed devices without cursor MOB support define cursor images with SVGA_CMD_DEFINE_ALPHA_CURSOR. SVGA_REG_CURSOR_MAX_DIMENSION belongs to the cursor MOB register class and reads as zero on devices that do not expose that class. Applying this register to GB-only cursors rejects every nonempty image submitted by KMS clients, leaving Xorg without a hardware cursor. The submission transport also limits the command size. A 96x96 image fits the 40 KiB FIFO image limit, but exceeds the 32 KiB command-buffer limit and causes a device command error when submitted through that transport. Validate GB-only images against SVGA_MAX_CURSOR_CMD_DIMENSION and SVGA_MAX_CURSOR_CMD_BYTES. For command-buffer submission, also bound the whole command by SVGA_CB_MAX_COMMAND_SIZE, including its header. Calculate the image byte count in 64 bits and keep the register-based dimension and MOB size checks for MOB cursors. Fixes: d5ed8749168a ("drm/vmwgfx: enforce cursor size limits for MOB cursors") Cc: stable@vger.kernel.org Reported-by: Yunfeng Li <yunfeng.li.nb@gmail.com> Closes: https://patch.msgid.link/20260830151619.2452307-1-yunfeng.li.nb@gmail.com Assisted-by: LLM Signed-off-by: Zack Rusin <zack.rusin@broadcom.com> Reviewed-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com> Tested-by: fausten <yunfeng.li.nb@gmail.com> Link: https://patch.msgid.link/20261027211729.646988-3-zack.rusin@broadcom.com
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions