diff options
| author | Zack Rusin <zack.rusin@broadcom.com> | 2026-05-05 18:22:32 -0400 |
|---|---|---|
| committer | Zack Rusin <zack.rusin@broadcom.com> | 2026-07-27 11:29:24 -0400 |
| commit | 54d56d5b42d2e4c72ba6e365e9774da90698aa22 (patch) | |
| tree | b6110448d1ec5cdcdd48719369760d427571b048 /tools/perf/scripts/python/parallel-perf.py | |
| parent | e5c3e484e0d84744a9bd9349469cd41dc8666a2f (diff) | |
drm/vmwgfx: use check_add_overflow for shader size+offset bound
vmw_shader_define() validates the user-supplied shader window against
its backing buffer with
(u64)buffer->tbo.base.size < (u64)size + (u64)offset
drm_vmw_shader_create_arg::offset is __u64 in the uapi; when it is
near U64_MAX the unsigned addition wraps and the resulting tiny value
passes the check. The unbounded offset is then stored in
res->guest_memory_offset and forwarded to host SVGA shader-create
commands.
Use check_add_overflow() to detect the wrap and compare the resulting
endpoint against the buffer size.
Fixes: 668b206601c5 ("drm/vmwgfx: Stop using raw ttm_buffer_object's")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4.7
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Reviewed-by: Ian Forbes <ian.forbes@broadcom.com>
Link: https://patch.msgid.link/20260505222728.519626-12-zack.rusin@broadcom.com
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions
