linux/drivers/gpu/drm/qxl
David Herrmann acb4652703 drm: verify vma access in TTM+GEM drivers
GEM does already a good job in tracking access to gem buffers via handles
and drm_vma access management. However, TTM drivers currently do not
verify this during mmap().

TTM provides the verify_access() callback to test this. So fix all drivers
to actually call into gem+vma to verify access instead of always returning
0.

All drivers assume that user-space can only get access to TTM buffers via
GEM handles. So whenever the verify_access() callback is called from
ttm_bo_mmap(), the buffer must have a valid embedded gem object. This is
true for all TTM+GEM drivers. But that's why this patch doesn't touch pure
TTM drivers (ie, vmwgfx).

v2: Switch to drm_vma_node_verify_access() to correctly return -EACCES if
    access was denied.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-08-27 11:54:58 +10:00
..
Kconfig qxl: fix Kconfig deps - select FB_DEFERRED_IO 2013-05-28 17:03:37 +10:00
Makefile
qxl_cmd.c qxl: convert qxl driver to proper use for reservations 2013-07-24 11:58:10 +10:00
qxl_debugfs.c drivers, drm: fix qxl build error when debugfs is disabled 2013-04-30 10:00:27 +10:00
qxl_dev.h
qxl_display.c qxl: convert qxl driver to proper use for reservations 2013-07-24 11:58:10 +10:00
qxl_draw.c qxl: convert qxl driver to proper use for reservations 2013-07-24 11:58:10 +10:00
qxl_drv.c drm: remove FASYNC support 2013-08-19 10:05:17 +10:00
qxl_drv.h drm/qxl: remove unused object_pin/unpin() helpers 2013-08-19 09:34:41 +10:00
qxl_dumb.c drm/gem: create drm_gem_dumb_destroy 2013-08-07 09:59:24 +10:00
qxl_fb.c drm/qxl: add delayed fb operations 2013-07-24 11:58:09 +10:00
qxl_fence.c qxl: convert qxl driver to proper use for reservations 2013-07-24 11:58:10 +10:00
qxl_gem.c drm/qxl: remove unused object_pin/unpin() helpers 2013-08-19 09:34:41 +10:00
qxl_image.c qxl: convert qxl driver to proper use for reservations 2013-07-24 11:58:10 +10:00
qxl_ioctl.c Merge remote-tracking branch 'pfdo/drm-rcar-for-v3.12' into drm-next 2013-08-19 09:24:13 +10:00
qxl_irq.c
qxl_kms.c qxl: use drm helper hotplug support 2013-07-05 10:44:19 +10:00
qxl_object.c drm/qxl: remove unused object_pin/unpin() helpers 2013-08-19 09:34:41 +10:00
qxl_object.h Merge remote-tracking branch 'pfdo/drm-rcar-for-v3.12' into drm-next 2013-08-19 09:24:13 +10:00
qxl_release.c Merge remote-tracking branch 'pfdo/drm-rcar-for-v3.12' into drm-next 2013-08-19 09:24:13 +10:00
qxl_ttm.c drm: verify vma access in TTM+GEM drivers 2013-08-27 11:54:58 +10:00