diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2012-11-21 16:04:18 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-11-28 20:09:08 +1000 |
commit | d08a9b9cd82f668a5437c23e59063387ca3ecec5 (patch) | |
tree | ba4f33c31d5cf530c244b2ec0fa8bf5865677563 /drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | |
parent | 219e81536c8776b30ccf3262c1ceaeaddf7a231a (diff) | |
download | linux-d08a9b9cd82f668a5437c23e59063387ca3ecec5.tar.bz2 |
drm/vmwgfx: Tighten the security around buffer maps
Make sure that other DRM clients can't map the contents of
non-shareable buffer objects.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c index ef1109c8fec8..96dc84dc34d0 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c @@ -248,13 +248,12 @@ void vmw_evict_flags(struct ttm_buffer_object *bo, *placement = vmw_sys_placement; } -/** - * FIXME: Proper access checks on buffers. - */ - static int vmw_verify_access(struct ttm_buffer_object *bo, struct file *filp) { - return 0; + struct ttm_object_file *tfile = + vmw_fpriv((struct drm_file *)filp->private_data)->tfile; + + return vmw_user_dmabuf_verify_access(bo, tfile); } static int vmw_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) |