[PATCH/RFC 0/3] Constify drm_driver

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

 



Hello,

This patch series makes it possible for DRM drivers to declare their
struct drm_driver as a static const. 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 performs the constification in the DRM core. Patch 3/3 is an
example of driver conversion to const drm_driver. If the series is
accepted, I'll write a coccinelle patch that handles all drivers.

Laurent Pinchart (3):
  drm: Move legacy device list out of drm_driver
  drm: Use a const drm_driver through the DRM core
  drm: rcar_du: Constify drm_driver

 drivers/gpu/drm/drm_drv.c                | 10 +++----
 drivers/gpu/drm/drm_pci.c                | 38 +++++++++++++++++-------
 drivers/gpu/drm/drm_vram_helper_common.c |  4 +--
 drivers/gpu/drm/rcar-du/rcar_du_drv.c    |  2 +-
 include/drm/drm_device.h                 |  4 ++-
 include/drm/drm_drv.h                    |  8 ++---
 include/drm/drm_legacy.h                 | 10 ++++---
 include/drm/drm_pci.h                    |  4 +--
 8 files changed, 49 insertions(+), 31 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