summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/qxl/qxl_ttm.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-08-25 18:28:58 +0200
committerDave Airlie <airlied@redhat.com>2013-08-27 11:54:56 +1000
commitca481c9b2a3ae3598453535b8f0369f1f875d52f (patch)
tree31b84f86251db898aa8fc8a1dfa14c3bd9a0ae97 /drivers/gpu/drm/qxl/qxl_ttm.c
parent88d7ebe59341dc3b82e662b80809694e3c6b3766 (diff)
downloadop-kernel-dev-ca481c9b2a3ae3598453535b8f0369f1f875d52f.zip
op-kernel-dev-ca481c9b2a3ae3598453535b8f0369f1f875d52f.tar.gz
drm/gem: implement vma access management
We implement automatic vma mmap() access management for all drivers using gem_mmap. We use the vma manager to add each open-file that creates a gem-handle to the vma-node of the underlying gem object. Once the handle is destroyed, we drop the open-file again. This allows us to use drm_vma_node_is_allowed() on _any_ gem object to see whether an open-file is granted access. In drm_gem_mmap() we use this to verify that unprivileged users cannot guess gem offsets and map arbitrary buffers. Note that this manages access for _all_ gem users (also TTM+GEM), but the actual access checks are only done for drm_gem_mmap(). TTM drivers use the TTM mmap helpers, which need to do that separately. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_ttm.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud