From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH/RFC 0/3] Constify drm_driver
Date: Sat, 22 Feb 2020 17:24:27 +0200 [thread overview]
Message-ID: <20200222152430.2984-1-laurent.pinchart+renesas@ideasonboard.com> (raw)
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2020-02-22 15:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-22 15:24 Laurent Pinchart [this message]
2020-02-22 15:24 ` [PATCH/RFC 1/3] drm: Move legacy device list out of drm_driver Laurent Pinchart
2020-02-22 17:58 ` Daniel Vetter
2020-02-22 15:24 ` [PATCH/RFC 2/3] drm: Use a const drm_driver through the DRM core Laurent Pinchart
2020-02-22 17:59 ` Daniel Vetter
2020-02-22 15:24 ` [PATCH/RFC 3/3] drm: rcar_du: Constify drm_driver Laurent Pinchart
2020-02-22 17:59 ` Daniel Vetter
2020-02-24 15:26 ` Emil Velikov
2020-02-26 1:54 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200222152430.2984-1-laurent.pinchart+renesas@ideasonboard.com \
--to=laurent.pinchart+renesas@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.