Re: [PATCH v3 1/6] drm: add DRM_SET_NAME ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/23/24 13:28, Dmitry Osipenko wrote:
...
>>  /**
>> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
>> index 16122819edfe..f5e92e4f909b 100644
>> --- a/include/uapi/drm/drm.h
>> +++ b/include/uapi/drm/drm.h
>> @@ -1024,6 +1024,13 @@ struct drm_crtc_queue_sequence {
>>  	__u64 user_data;	/* user data passed to event */
>>  };
>>  
>> +#define DRM_NAME_MAX_LEN	64
> 
> What about 63, to align data size to 64 bytes including the NULL byte.

On the other hand, the string is copied without NULL byte, so it doesn't
matter.

This leads to another question, why not using strndup_user like it's
done for dma_buf_set_name?

-- 
Best regards,
Dmitry




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux