Skip to content

Fix issues found by claude-opus-4.7

Zack Rusin dri-devel stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12drm/vmwgfx: fix guest_memory_dirty bitfield clobbered as sizedrivers/gpu/drm/vmwgfx/vmwgfx_resource.c+2 -20 replies
2/12drm/vmwgfx: reject DX_BIND_QUERY without a DX contextdrivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c+5 -10 replies
3/12drm/vmwgfx: clamp dirty-page range with min, not maxdrivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c+2 -20 replies
4/12drm/vmwgfx: take fman->lock around fence list mutation in fifo_downdrivers/gpu/drm/vmwgfx/vmwgfx_fence.c+12 -11 reply
5/12drm/vmwgfx: drop dma_buf reference on foreign-fd prime importdrivers/gpu/drm/vmwgfx/ttm_object.c+5 -20 replies
6/12drm/vmwgfx: validate DRAW_PRIMITIVES header size before divisiondrivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c+7 -10 replies
7/12drm/vmwgfx: bound DMA command body size against suffix pointerdrivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c+6 -00 replies
8/12drm/vmwgfx: avoid destroy_workqueue(NULL) on vkms init failuredrivers/gpu/drm/vmwgfx/vmwgfx_vkms.c+9 -80 replies
9/12drm/vmwgfx: enforce cursor size limits for MOB cursorsdrivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c+44 -52 replies
10/12drm/vmwgfx: skip hash_del_rcu when validation context has no hash tabledrivers/gpu/drm/vmwgfx/vmwgfx_validation.c+2 -12 replies
11/12drm/vmwgfx: use check_add_overflow for shader size+offset bounddrivers/gpu/drm/vmwgfx/vmwgfx_shader.c+9 -40 replies
12/12drm/vmwgfx: validate external BO copy bounds for both stride pathsdrivers/gpu/drm/vmwgfx/vmwgfx_blit.c+31 -80 replies

Reviews trailers per patch

None of the 12 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchIan Forbes
SeriesR-b
1/12
2/12
3/12
4/12
5/12
6/12
7/12
8/12
9/12
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/12] Fix issues found by claude-opus-4.7

This is new for me but it seemed to work ok because it detected issues that have been present in the driver for years. The fixes were written by me but the bugs were found using claude-opus-4.7.

The following prompt was used:
"Carefully review the vmwgfx driver at drivers/gpu/drm/vmwgfx for clear and obvious logic errors. Limit your investigation to vmwgfx. Do not suggest patches or reason about possible fixes.

Provide clear explanation for why the code is buggy. Make sure to include exact file names and line numbers not only for the bug but for the exact execution paths that trigger it. Try to follow the process described in "Describe your changes" at Documentation/process/submitting-patches.rst to describe the bugs.".

For the commit messages I've reused parts of the explanations that were provided by claude-opus-4.7.

Zack Rusin (12):
drm/vmwgfx: fix guest_memory_dirty bitfield clobbered as size drm/vmwgfx: reject DX_BIND_QUERY without a DX context drm/vmwgfx: clamp dirty-page range with min, not max drm/vmwgfx: take fman->lock around fence list mutation in fifo_down drm/vmwgfx: drop dma_buf reference on foreign-fd prime import drm/vmwgfx: validate DRAW_PRIMITIVES header size before division drm/vmwgfx: bound DMA command body size against suffix pointer drm/vmwgfx: avoid destroy_workqueue(NULL) on vkms init failure drm/vmwgfx: enforce cursor size limits for MOB cursors drm/vmwgfx: skip hash_del_rcu when validation context has no hash
table
drm/vmwgfx: use check_add_overflow for shader size+offset bound drm/vmwgfx: validate external BO copy bounds for both stride paths

 drivers/gpu/drm/vmwgfx/ttm_object.c          |  7 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_blit.c         | 39 ++++++++++++----
 drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c | 49 ++++++++++++++++++--
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c      | 20 +++++++-
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c        | 13 +++++-
 drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c   |  4 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c     |  4 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_shader.c       | 13 ++++--
 drivers/gpu/drm/vmwgfx/vmwgfx_validation.c   |  3 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_vkms.c         | 17 +++----
 10 files changed, 134 insertions(+), 35 deletions(-)
Signature · 1 line
2.51.0