dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] drm/gem: Audit around handle_create races
@ 2025-05-28  9:12 Simona Vetter
  2025-05-28  9:12 ` [PATCH 1/8] drm/gem: Fix race in drm_gem_handle_create_tail() Simona Vetter
                   ` (7 more replies)
  0 siblings, 8 replies; 27+ messages in thread
From: Simona Vetter @ 2025-05-28  9:12 UTC (permalink / raw)
  To: DRI Development; +Cc: intel-xe, Simona Vetter

Hi all,

Thanks to a report by Jacek Lawrynowicz I've crawled around in core and
driver code around drm_gem_handle_create() and found a bunch of issues.

Attached series is either fixes where I could do them, or RFC-style
patches that just add a comment about what looks wrong. The conversion
from idr_for_each_entry to idr_for_each only fixes temporary premature idr
iteration termination, and so fairly benign impact.

Testing and review very much welcome.

Cheers, Sima

Simona Vetter (8):
  drm/gem: Fix race in drm_gem_handle_create_tail()
  drm/fdinfo: Switch to idr_for_each() in drm_show_memory_stats()
  drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code
  accel/qaic: delete qaic_bo.handle
  drm/amd/kfd: Add comment about possible drm_gem_handle_create() race
  drm/amdgpu: Add comments about drm_file.object_idr issues
  drm/vmwgfx: Add comments about drm_file.object_idr issues
  drm/xe: Add comments about drm_file.object_idr issues

 drivers/accel/qaic/qaic.h                     |  2 -
 drivers/accel/qaic/qaic_data.c                |  1 -
 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c  |  2 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c       |  2 +
 drivers/gpu/drm/drm_file.c                    | 95 +++++++++++--------
 drivers/gpu/drm/drm_gem.c                     | 10 +-
 drivers/gpu/drm/panthor/panthor_gem.c         | 31 +++---
 drivers/gpu/drm/panthor/panthor_gem.h         |  3 -
 drivers/gpu/drm/vmwgfx/vmwgfx_gem.c           |  1 +
 drivers/gpu/drm/xe/xe_drm_client.c            |  3 +
 include/drm/drm_file.h                        |  3 +
 11 files changed, 90 insertions(+), 63 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2025-06-06 16:25 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-28  9:12 [PATCH 0/8] drm/gem: Audit around handle_create races Simona Vetter
2025-05-28  9:12 ` [PATCH 1/8] drm/gem: Fix race in drm_gem_handle_create_tail() Simona Vetter
2025-05-28  9:26   ` Simona Vetter
2025-05-28 13:20   ` Jacek Lawrynowicz
2025-06-02 15:15   ` Thomas Zimmermann
2025-06-03 11:45     ` Simona Vetter
2025-06-03 12:40       ` Thomas Zimmermann
2025-06-04  9:02       ` Simona Vetter
2025-05-28  9:13 ` [PATCH 2/8] drm/fdinfo: Switch to idr_for_each() in drm_show_memory_stats() Simona Vetter
2025-05-28  9:22   ` Simona Vetter
2025-05-28 20:10   ` kernel test robot
2025-05-28  9:13 ` [PATCH 3/8] drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code Simona Vetter
2025-05-29 12:31   ` kernel test robot
2025-06-01 14:06   ` Adrián Larumbe
2025-06-02 14:46     ` Simona Vetter
2025-05-28  9:13 ` [PATCH 4/8] accel/qaic: delete qaic_bo.handle Simona Vetter
2025-05-28 15:15   ` Jeff Hugo
2025-06-02 14:43     ` Simona Vetter
2025-06-03 14:43       ` Jeff Hugo
2025-06-06 16:25   ` Jeff Hugo
2025-05-28  9:13 ` [PATCH 5/8] drm/amd/kfd: Add comment about possible drm_gem_handle_create() race Simona Vetter
2025-05-28  9:13 ` [PATCH 6/8] drm/amdgpu: Add comments about drm_file.object_idr issues Simona Vetter
2025-05-28  9:22   ` Simona Vetter
2025-05-28  9:13 ` [PATCH 7/8] drm/vmwgfx: " Simona Vetter
2025-05-28  9:23   ` Simona Vetter
2025-05-28  9:13 ` [PATCH 8/8] drm/xe: " Simona Vetter
2025-05-28  9:24   ` Simona Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).