diff options
| author | Zack Rusin <zack.rusin@broadcom.com> | 2026-10-27 08:07:40 -0400 |
|---|---|---|
| committer | Zack Rusin <zack.rusin@broadcom.com> | 2026-11-16 15:09:34 -0500 |
| commit | d6263d9bfa931dfc7e0dd922a6ee52b5535caa74 (patch) | |
| tree | 56dc4e04a1d133a7aea0f6a3b08a2b0883bb7969 /rust/kernel/alloc/kvec/errors.rs | |
| parent | 13e766130673ec3b9df8b72ff1dbe6826cac1dfe (diff) | |
drm/vmwgfx: validate the framebuffer selected for cursor updates
Cursor atomic checks select an update path and look up surfaces through
vps->uo. That object is copied from the previous plane state and is only
replaced with the new framebuffer's object in prepare_fb(). Switching
between snooped surfaces and buffer objects therefore applies the old
framebuffer's cursor limits to the new image.
KMS clients can also submit a guest-backed surface without a backing BO.
The check accepts it, but the MOB update later copies from a NULL source.
Zero-sized MOB images pass the check as well, then fail preparation when
mapping zero pages, so TEST_ONLY accepts a commit that cannot succeed.
Resolve the user object directly from the selected framebuffer in both
validation and preparation. Apply the matching cursor limits, reject
zero dimensions and require a backing BO for GB-only and MOB images.
Recheck the backing BO in preparation before mapping it, while keeping
snooped surfaces independent of a BO mapping.
Fixes: 965544150d1c ("drm/vmwgfx: Refactor cursor handling")
Cc: stable@vger.kernel.org
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-6-zack.rusin@broadcom.com
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
