[igt-dev] [PATCH i-g-t 3/3] lib/fb: Clear framebuffer on amdgpu

Kazlauskas, Nicholas Nicholas.Kazlauskas at amd.com
Fri Mar 8 15:00:46 UTC 2019


On 3/8/19 9:40 AM, Chris Wilson wrote:
> Quoting Nicholas Kazlauskas (2019-03-08 14:36:03)
>> IGT expects buffers returned from DRM_IOCTL_MODE_MAP_DUMB to be
>> cleared, but amdgpu retains the contents previously in memory
>> in the buffer - clear it on amdgpu by with a memset to 0.
> 
> How is this not a kernel information leak?
> -Chris
> 

I actually meant to write DRM_IOCTL_MODE_CREATE_DUMB, but it is an 
information leak for whatever was previously in VRAM anyway.

With AMDGPU you have to explicitly ask for the memory to be cleared when 
creating the BO with AMDGPU_GEM_CREATE_VRAM_CLEARED, but that flag isn't 
one of the flags used when creating buffers for amdgpu_mode_dumb_create.

Maybe it should be, but I'd be considered with any potential performance 
impact in doing so at least. I haven't done much driver benchmarking 
myself to know if it's a good idea or not.

Nicholas Kazlauskas


More information about the igt-dev mailing list