Re: [RFC 3/3] drm: Update file owner during use

2023-01-12 Thread Tvrtko Ursulin
On 11/01/2023 22:19, Daniel Vetter wrote: On Tue, Jan 10, 2023 at 01:14:51PM +, Tvrtko Ursulin wrote: On 06/01/2023 18:00, Daniel Vetter wrote: On Fri, Jan 06, 2023 at 03:53:13PM +0100, Christian König wrote: Am 06.01.23 um 11:53 schrieb Daniel Vetter: On Fri, Jan 06, 2023 at

Re: [RFC 3/3] drm: Update file owner during use

2023-01-11 Thread Daniel Vetter
On Tue, Jan 10, 2023 at 01:14:51PM +, Tvrtko Ursulin wrote: > > On 06/01/2023 18:00, Daniel Vetter wrote: > > On Fri, Jan 06, 2023 at 03:53:13PM +0100, Christian König wrote: > > > Am 06.01.23 um 11:53 schrieb Daniel Vetter: > > > > On Fri, Jan 06, 2023 at 11:32:17AM +0100, Christian König

Re: [RFC 3/3] drm: Update file owner during use

2023-01-10 Thread Tvrtko Ursulin
On 06/01/2023 18:00, Daniel Vetter wrote: On Fri, Jan 06, 2023 at 03:53:13PM +0100, Christian König wrote: Am 06.01.23 um 11:53 schrieb Daniel Vetter: On Fri, Jan 06, 2023 at 11:32:17AM +0100, Christian König wrote: Am 05.01.23 um 13:32 schrieb Daniel Vetter: [SNIP] For the case of an

Re: [RFC 3/3] drm: Update file owner during use

2023-01-06 Thread Daniel Vetter
On Fri, Jan 06, 2023 at 03:53:13PM +0100, Christian König wrote: > Am 06.01.23 um 11:53 schrieb Daniel Vetter: > > On Fri, Jan 06, 2023 at 11:32:17AM +0100, Christian König wrote: > > > Am 05.01.23 um 13:32 schrieb Daniel Vetter: > > > > [SNIP] > > > > > For the case of an master fd I actually

Re: [RFC 3/3] drm: Update file owner during use

2023-01-06 Thread Christian König
Am 06.01.23 um 11:53 schrieb Daniel Vetter: On Fri, Jan 06, 2023 at 11:32:17AM +0100, Christian König wrote: Am 05.01.23 um 13:32 schrieb Daniel Vetter: [SNIP] For the case of an master fd I actually don't see the reason why we should limit that? And fd can become master if it either was

Re: [RFC 3/3] drm: Update file owner during use

2023-01-06 Thread Tvrtko Ursulin
On 05/01/2023 12:32, Daniel Vetter wrote: On Fri, Dec 02, 2022 at 10:01:01AM +0100, Christian König wrote: Am 01.12.22 um 12:09 schrieb Tvrtko Ursulin: On 30/11/2022 14:18, Daniel Vetter wrote: On Wed, Nov 30, 2022 at 01:34:07PM +, Tvrtko Ursulin wrote: From: Tvrtko Ursulin With the

Re: [RFC 3/3] drm: Update file owner during use

2023-01-06 Thread Daniel Vetter
On Fri, Jan 06, 2023 at 11:32:17AM +0100, Christian König wrote: > Am 05.01.23 um 13:32 schrieb Daniel Vetter: > > [SNIP] > > > For the case of an master fd I actually don't see the reason why we should > > > limit that? And fd can become master if it either was master before or has > > >

Re: [RFC 3/3] drm: Update file owner during use

2023-01-06 Thread Christian König
Am 05.01.23 um 13:32 schrieb Daniel Vetter: [SNIP] For the case of an master fd I actually don't see the reason why we should limit that? And fd can become master if it either was master before or has CAP_SYS_ADMIN. Why would we want an extra check for the pid/tgid here? This is just

Re: [RFC 3/3] drm: Update file owner during use

2023-01-05 Thread Daniel Vetter
On Fri, Dec 02, 2022 at 10:01:01AM +0100, Christian König wrote: > Am 01.12.22 um 12:09 schrieb Tvrtko Ursulin: > > > > On 30/11/2022 14:18, Daniel Vetter wrote: > > > On Wed, Nov 30, 2022 at 01:34:07PM +, Tvrtko Ursulin wrote: > > > > From: Tvrtko Ursulin > > > > > > > > With the typical

Re: [RFC 3/3] drm: Update file owner during use

2022-12-02 Thread Christian König
Am 01.12.22 um 12:09 schrieb Tvrtko Ursulin: On 30/11/2022 14:18, Daniel Vetter wrote: On Wed, Nov 30, 2022 at 01:34:07PM +, Tvrtko Ursulin wrote: From: Tvrtko Ursulin With the typical model where the display server opends the file descriptor and then hands it over to the client we

Re: [RFC 3/3] drm: Update file owner during use

2022-12-01 Thread Tvrtko Ursulin
On 30/11/2022 14:18, Daniel Vetter wrote: On Wed, Nov 30, 2022 at 01:34:07PM +, Tvrtko Ursulin wrote: From: Tvrtko Ursulin With the typical model where the display server opends the file descriptor and then hands it over to the client we were showing stale data in debugfs. Fix it by

Re: [RFC 3/3] drm: Update file owner during use

2022-11-30 Thread Daniel Vetter
On Wed, Nov 30, 2022 at 01:34:07PM +, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > With the typical model where the display server opends the file descriptor > and then hands it over to the client we were showing stale data in > debugfs. > > Fix it by updating the drm_file->pid on ioctl

[RFC 3/3] drm: Update file owner during use

2022-11-30 Thread Tvrtko Ursulin
From: Tvrtko Ursulin With the typical model where the display server opends the file descriptor and then hands it over to the client we were showing stale data in debugfs. Fix it by updating the drm_file->pid on ioctl access from a different process. The field is also made RCU protected to