[PATCH -next 10/18] drm/ttm: Make the object handles idr-generated

Thomas Hellstrom thellstrom at vmware.com
Wed Sep 26 16:46:57 UTC 2018


On 09/26/2018 06:36 PM, Christian König wrote:
> Am 26.09.2018 um 18:18 schrieb Thomas Hellstrom:
>> Instead of generating user-space object handles based on a, possibly
>> processed, hash of the kernel address of the object, use idr to generate
>> and lookup those handles. This might improve somewhat on security since
>> we loose all connections to the object's kernel address. Also idr is
>> designed to do just this.
>>
>> As a todo-item, since user-space handles are now generated in sequence,
>> we can probably use a much simpler hash function to hash them.
>>
>> Cc: Christian König <christian.koenig at amd.com>
>> Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
>> Reviewed-by: Sinclair Yeh <syeh at vmware.com>
>> Reviewed-by: Deepak Rawat <drawat at vmware.com>
>
> Well NAK. I already proposed completely removing ttm_lock.c and 
> ttm_object.c because vmwgfx is the only user of it.
>
> Please move that functionality into the driver since it isn't TTM 
> specific after all.
>
> Christian. 
Actually, I thought that was already done in -next, but it wasn't. I 
vaguely recall seeing some patches doing that, but I might remember 
incorrectly or they were never pushed.

I'll move those files over.

/Thomas



More information about the dri-devel mailing list