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

2024-09-24 Thread Dmitry Osipenko
On 9/23/24 21:18, Dmitry Osipenko wrote: > On 9/23/24 21:09, Dmitry Osipenko wrote: >>> Sure, I can do that if others prefer this way too. >> Note that in the other email I suggested to use strndup_user(), that >> will remove the name-length limitation, but then the name var will >> remain to be a

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

2024-09-24 Thread Tvrtko Ursulin
On 24/09/2024 09:22, Pierre-Eric Pelloux-Prayer wrote: Le 23/09/2024 à 12:06, Tvrtko Ursulin a écrit : On 20/09/2024 10:06, Pierre-Eric Pelloux-Prayer wrote: Giving the opportunity to userspace to associate a free-form name with a drm_file struct is helpful for tracking and debugging. Thi

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

2024-09-24 Thread Pierre-Eric Pelloux-Prayer
Le 23/09/2024 à 12:06, Tvrtko Ursulin a écrit : On 20/09/2024 10:06, Pierre-Eric Pelloux-Prayer wrote: Giving the opportunity to userspace to associate a free-form name with a drm_file struct is helpful for tracking and debugging. This is similar to the existing DMA_BUF_SET_NAME ioctl. Acc

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

2024-09-23 Thread Dmitry Osipenko
On 9/23/24 21:09, Dmitry Osipenko wrote: >> Sure, I can do that if others prefer this way too. > Note that in the other email I suggested to use strndup_user(), that > will remove the name-length limitation, but then the name var will > remain to be a string pointer. To me best option would be to r

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

2024-09-23 Thread Dmitry Osipenko
On 9/23/24 19:29, Pierre-Eric Pelloux-Prayer wrote: ... >>> @@ -78,12 +78,13 @@ static int drm_clients_info(struct seq_file *m, >>> void *data) >>>   kuid_t uid; >>>     seq_printf(m, >>> -   "%20s %5s %3s master a %5s %10s\n", >>> +   "%20s %5s %3s master a %5s %10s %20s\n"

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

2024-09-23 Thread Pierre-Eric Pelloux-Prayer
Hi Dmitry, Le 23/09/2024 à 12:28, Dmitry Osipenko a écrit : On 9/20/24 12:06, Pierre-Eric Pelloux-Prayer wrote: Giving the opportunity to userspace to associate a free-form name with a drm_file struct is helpful for tracking and debugging. This is similar to the existing DMA_BUF_SET_NAME ioctl

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

2024-09-23 Thread Dmitry Osipenko
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 us

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

2024-09-23 Thread Dmitry Osipenko
On 9/20/24 12:06, Pierre-Eric Pelloux-Prayer wrote: > Giving the opportunity to userspace to associate a free-form > name with a drm_file struct is helpful for tracking and debugging. > > This is similar to the existing DMA_BUF_SET_NAME ioctl. > > Access to name is protected by a mutex, and the '

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

2024-09-23 Thread Tvrtko Ursulin
On 20/09/2024 10:06, Pierre-Eric Pelloux-Prayer wrote: Giving the opportunity to userspace to associate a free-form name with a drm_file struct is helpful for tracking and debugging. This is similar to the existing DMA_BUF_SET_NAME ioctl. Access to name is protected by a mutex, and the 'clien

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

2024-09-20 Thread Pierre-Eric Pelloux-Prayer
Giving the opportunity to userspace to associate a free-form name with a drm_file struct is helpful for tracking and debugging. This is similar to the existing DMA_BUF_SET_NAME ioctl. Access to name is protected by a mutex, and the 'clients' debugfs file has been updated to print it. Userspace M