[PATCH 10/16] drm/gem: implement mmap access management
David Herrmann
dh.herrmann at gmail.com
Fri Aug 23 04:14:23 PDT 2013
Hi
On Tue, Aug 13, 2013 at 11:05 PM, Daniel Vetter <daniel at ffwll.ch> wrote:
> On Tue, Aug 13, 2013 at 09:38:31PM +0200, David Herrmann wrote:
>> Implement automatic access management for mmap offsets for all GEM
>> drivers. This prevents user-space applications from "guessing" GEM BO
>> offsets and accessing buffers which they don't own.
>>
>> TTM drivers or other modesetting drivers with custom mm handling might
>> make use of GEM but don't need its mmap helpers. To avoid unnecessary
>> overhead, we limit GEM access management to drivers using DRIVER_GEM_MMAP.
>> So for TTM drivers GEM will not call any *_allow() or *_revoke() helpers.
>>
>> Signed-off-by: David Herrmann <dh.herrmann at gmail.com>
>
> Overall I'm not sold why we need the GEM_MMAP feature flag. Drivers that
> don't use drm_gem_mmap shouldn't get hurt with it if we ignore the little
> bit of useless overhead due to obj->vma_node. But they already have that
> anyway with obj->vma, so meh. And more incentives to move ttm over to the
> gem object manager completely ;-)
>
> One comment below.
I fixed both, the error-path and GEM_MMAP. Thanks!
Cheers
David
More information about the dri-devel
mailing list