[PATCH 1/3] drm/amdgpu: Add flag for allocating memory for sensitive data

Kuehling, Felix Felix.Kuehling at amd.com
Tue Jul 9 19:03:01 UTC 2019


On 2019-07-09 8:59 a.m., Alex Deucher wrote:
> On Tue, Jul 9, 2019 at 1:32 AM Kuehling, Felix <Felix.Kuehling at amd.com> wrote:
>> This memory allocation flag will be used to indicate BOs containing
>> sensitive data that should not be leaked to other processes.
>>
>> Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
>> ---
>>   include/uapi/drm/amdgpu_drm.h | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
>> index 61870478bc9c..58659c28c26e 100644
>> --- a/include/uapi/drm/amdgpu_drm.h
>> +++ b/include/uapi/drm/amdgpu_drm.h
>> @@ -131,6 +131,10 @@ extern "C" {
>>    * for the second page onward should be set to NC.
>>    */
>>   #define AMDGPU_GEM_CREATE_MQD_GFX9             (1 << 8)
>> +/* Flag that BO may contain sensitive data that must be cleared before
>> + * releasing the memory
>> + */
>> +#define AMDGPU_GEM_CREATE_VRAM_SENSITIVE       (1 << 9)
> If we decide to go this route, I'd like to make this flag more explicit.  E.g.,
>
> AMDGPU_GEM_CREATE_VRAM_CLEAR_ON_FREE

It's more than just clear on free. Memory needs to get cleared whenever 
the backing physical memory gets released to be reused by other 
processes. That can be because of a free, or because the buffer moved, 
or because it was evicted.

Regards,
   Felix


>
> Alex
>
>>   struct drm_amdgpu_gem_create_in  {
>>          /** the requested memory size */
>> --
>> 2.17.1
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list