From: David Herrmann Date: Sun, 25 Aug 2013 16:28:58 +0000 (+0200) Subject: drm/gem: implement vma access management X-Git-Tag: v3.12-rc1~136^2~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca481c9b2a3ae3598453535b8f0369f1f875d52f;p=pandora-kernel.git 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 Signed-off-by: Dave Airlie --- Reading git-diff-tree failed