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(-)

-- 
2.51.0

Reply via email to