All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] drm, drm/vmwgfx: fixes and updates related to drm_master
@ 2021-07-24 11:18 ` Desmond Cheong Zhi Xi
  0 siblings, 0 replies; 30+ messages in thread
From: Desmond Cheong Zhi Xi @ 2021-07-24 11:18 UTC (permalink / raw)
  To: linux-graphics-maintainer, zackr, airlied, daniel,
	maarten.lankhorst, mripard, tzimmermann, corbet
  Cc: Desmond Cheong Zhi Xi, dri-devel, linux-kernel, skhan, gregkh,
	linux-kernel-mentees

Hi,

Just a note that only patch 2 changed from v1 to v2 of this series.

This series contains some improvements that Daniel Vetter proposed following a discussion on a recent series:
https://lore.kernel.org/lkml/20210712043508.11584-1-desmondcheongzx@gmail.com/

While preparing these patches, I also noticed some unprotected uses of drm_master in the vmwgfx driver that can be addressed by new functions from the previous series.

This series is thus broken up into three patches:

1. Switch from the outer drm_device.master_mutex to the inner drm_file.master_lookup_lock in drm_is_current_master.

2. Update the kerneldoc for drm leases to clarify usage and lifetime/locking rules.

3. Prevent potential use-after-free bugs by replacing calls to drm_master_get with drm_file_get_master in vmwgfx_surface.c.

v1 -> v2:
Changes to patch 2:
- Clarified description of lease fields in drm_master with suggestions from Daniel Vetter.
- Added an overview DOC: section for drm leases in drm-uapi.rst.
- Cleaned up function documentation in drm_lease.c to use kernel-doc formatting.

Best wishes,
Desmond

Desmond Cheong Zhi Xi (3):
  drm: use the lookup lock in drm_is_current_master
  drm: clarify usage of drm leases
  drm/vmwgfx: fix potential UAF in vmwgfx_surface.c

 Documentation/gpu/drm-uapi.rst          |  15 ++
 drivers/gpu/drm/drm_auth.c              |   9 +-
 drivers/gpu/drm/drm_lease.c             | 182 ++++++++++++++----------
 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c |   4 +-
 include/drm/drm_auth.h                  |  67 +++++++--
 5 files changed, 187 insertions(+), 90 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-07-28 12:22 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-24 11:18 [PATCH v2 0/3] drm, drm/vmwgfx: fixes and updates related to drm_master Desmond Cheong Zhi Xi
2021-07-24 11:18 ` Desmond Cheong Zhi Xi
2021-07-24 11:18 ` Desmond Cheong Zhi Xi
2021-07-24 11:18 ` [PATCH v2 1/3] drm: use the lookup lock in drm_is_current_master Desmond Cheong Zhi Xi
2021-07-24 11:18   ` [Intel-gfx] " Desmond Cheong Zhi Xi
2021-07-24 11:18   ` Desmond Cheong Zhi Xi
2021-07-24 11:18   ` Desmond Cheong Zhi Xi
2021-07-27 13:04   ` Daniel Vetter
2021-07-27 13:04     ` [Intel-gfx] " Daniel Vetter
2021-07-27 13:04     ` Daniel Vetter
2021-07-27 13:04     ` Daniel Vetter
2021-07-24 11:18 ` [PATCH v2 2/3] drm: clarify usage of drm leases Desmond Cheong Zhi Xi
2021-07-24 11:18   ` [Intel-gfx] " Desmond Cheong Zhi Xi
2021-07-24 11:18   ` Desmond Cheong Zhi Xi
2021-07-24 11:18   ` Desmond Cheong Zhi Xi
2021-07-27 13:04   ` Daniel Vetter
2021-07-27 13:04     ` [Intel-gfx] " Daniel Vetter
2021-07-27 13:04     ` Daniel Vetter
2021-07-27 13:04     ` Daniel Vetter
2021-07-28 10:01     ` Desmond Cheong Zhi Xi
2021-07-28 10:01       ` [Intel-gfx] " Desmond Cheong Zhi Xi
2021-07-28 10:01       ` Desmond Cheong Zhi Xi
2021-07-28 10:01       ` Desmond Cheong Zhi Xi
2021-07-24 11:18 ` [PATCH v2 3/3] drm/vmwgfx: fix potential UAF in vmwgfx_surface.c Desmond Cheong Zhi Xi
2021-07-24 11:18   ` [Intel-gfx] " Desmond Cheong Zhi Xi
2021-07-24 11:18   ` Desmond Cheong Zhi Xi
2021-07-24 11:18   ` Desmond Cheong Zhi Xi
2021-07-26  9:12 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [v2,1/3] drm: use the lookup lock in drm_is_current_master Patchwork
2021-07-26  9:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-07-26 12:10 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.