mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-15 08:11:30 +00:00
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>
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| qxl_cmd.c | ||
| qxl_debugfs.c | ||
| qxl_dev.h | ||
| qxl_display.c | ||
| qxl_draw.c | ||
| qxl_drv.c | ||
| qxl_drv.h | ||
| qxl_dumb.c | ||
| qxl_fb.c | ||
| qxl_fence.c | ||
| qxl_gem.c | ||
| qxl_image.c | ||
| qxl_ioctl.c | ||
| qxl_irq.c | ||
| qxl_kms.c | ||
| qxl_object.c | ||
| qxl_object.h | ||
| qxl_release.c | ||
| qxl_ttm.c | ||