[PATCH v2 0/3] Finish constification of drm_driver in DRM core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

This patch series finishes the constification of struct drm_driver in
the DRM core by avoiding modifications to the structure for legacy PCI
drivers. This improves security by avoiding function pointers in
writable memory.

The change turned out to be fairly easy, with preparation in patch 1/3
that moves the only non-const field out of drm_driver, and patch 2/3
that finishes the constification in the DRM core. Patch 3/3 is a
low-hanging fruit that constifies the structure in a few drivers.

The remaining non-const drivers modify the structure internally to set
the num_ioctls fields, and in a few cases, change the driver features.
This will require a bit more work to fix these cases.

Laurent Pinchart (3):
  drm: Move legacy device list out of drm_driver
  drm: Use a const drm_driver for legacy PCI devices
  drm: Constify drm_driver in drivers that don't modify it

 drivers/gpu/drm/arc/arcpgu_drv.c |  2 +-
 drivers/gpu/drm/drm_drv.c        |  4 ----
 drivers/gpu/drm/drm_pci.c        | 33 +++++++++++++++++++++-----------
 drivers/gpu/drm/kmb/kmb_drv.c    |  2 +-
 drivers/gpu/drm/tdfx/tdfx_drv.c  |  2 +-
 include/drm/drm_device.h         | 14 +++-----------
 include/drm/drm_drv.h            |  2 --
 include/drm/drm_legacy.h         | 10 ++++++----
 8 files changed, 34 insertions(+), 35 deletions(-)

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux