[PATCH 01/11] drm/amdgpu: try allocating VRAM as power of two

Christian König ckoenig.leichtzumerken at gmail.com
Tue Sep 11 08:20:29 UTC 2018


Am 11.09.2018 um 09:55 schrieb Michel Dänzer:
> On 2018-09-11 9:46 a.m., Christian König wrote:
>> Am 11.09.2018 um 09:37 schrieb Michel Dänzer:
>>> On 2018-09-11 8:49 a.m., Christian König wrote:
>>>> But another question: Why do you want to clear VRAM on allocation? We
>>>> perfectly support allocating VRAM without clearing it.
>>> Which is a problem of its own, as it can leak information from one
>>> process to another.
>> How about adding a AMDGPU_GEM_CREATE_VRAM_SECRED flag which triggers
>> clearing VRAM when the BO is freed?
> Doesn't sound like much better API than AMDGPU_GEM_CREATE_VRAM_CLEARED
> to me. Why would any process be okay with leaking its BO contents to
> other processes?

Well the content of most BOs is uninteresting to other processes, e.g. 
textures.

Only things like page tables and maybe some security related 
calculations need extra protection as far as I can see.

> Could that flag even prevent it in all cases, e.g. when
> BOs are evicted or otherwise migrated?

Yeah, sure that shouldn't be a problem. Clearing a BO after it is moved 
should be trivial.

Christian.


More information about the amd-gfx mailing list