Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-11-02 Thread Christian König
Am 02.11.23 um 12:19 schrieb Lucas Stach: Am Donnerstag, dem 02.11.2023 um 11:48 +0100 schrieb Christian König: [...] I was considering to change the dma_fence semantics so that dma_fence_signal() could only be called from the interrupt contexts of devices and then put a big fat

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-11-02 Thread Lucas Stach
Am Donnerstag, dem 02.11.2023 um 11:48 +0100 schrieb Christian König: [...] > I was considering to change the dma_fence semantics so that > dma_fence_signal() could only be called from the interrupt contexts of > devices and then put a big fat WARN_ON(!in_interrupt()) in there. > > It's a

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-11-02 Thread Christian König
Am 01.11.23 um 09:13 schrieb Daniel Vetter: On Wed, 1 Nov 2023 at 07:59, Dave Airlie wrote: Well, to make it clear once more: Signaling a dma_fence from the destructor of a reference counted object is very problematic! This will be rejected no matter if you do that in C or in Rust. What we

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-11-01 Thread Daniel Vetter
On Wed, 1 Nov 2023 at 07:59, Dave Airlie wrote: > > > > > Well, to make it clear once more: Signaling a dma_fence from the > > destructor of a reference counted object is very problematic! This will > > be rejected no matter if you do that in C or in Rust. > > > > What we can do is to make it

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-11-01 Thread Dave Airlie
> > Well, to make it clear once more: Signaling a dma_fence from the > destructor of a reference counted object is very problematic! This will > be rejected no matter if you do that in C or in Rust. > > What we can do is to make it safe in the sense that you don't access > freed up memory by using

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-31 Thread Christian König
Am 21.07.23 um 12:33 schrieb Asahi Lina: [SNIP] I've already tried to explain the issue. The DRM scheduler design, as it stands today, makes it impractical to write a safe Rust abstraction for it. This is a fact. Christian has repeatedly NAKed my attempts at changing it to make such a safe

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-28 Thread Christian König
Am 18.07.23 um 04:35 schrieb Asahi Lina: On 18/07/2023 00.55, Christian König wrote: [SNIP] I give up. You are ignoring everything we say, and rejecting everything we suggest. We've already explained why drm_sched doesn't work for us. I'm tired of repeating the same explanation over and

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-21 Thread Asahi Lina
On 18/07/2023 14.45, Luben Tuikov wrote: On 2023-07-17 22:35, Asahi Lina wrote: On 18/07/2023 00.55, Christian König wrote: Am 15.07.23 um 16:14 schrieb aly...@rosenzweig.io: 15 July 2023 at 00:03, "Luben Tuikov" wrote: On 2023-07-14 05:57, Christian König wrote: Am 14.07.23 um 11:49

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-18 Thread Pekka Paalanen
On Mon, 17 Jul 2023 17:55:04 +0200 Christian König wrote: > Am 15.07.23 um 16:14 schrieb aly...@rosenzweig.io: ... > > Lina has been polite and accommodating while AMD calls her code > > "outright nonsense" and gets "outright NAK"s, and puts her into an > > impossible catch-22 where no matter

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-17 Thread Luben Tuikov
On 2023-07-17 22:35, Asahi Lina wrote: > On 18/07/2023 00.55, Christian König wrote: >> Am 15.07.23 um 16:14 schrieb aly...@rosenzweig.io: >>> 15 July 2023 at 00:03, "Luben Tuikov" wrote: On 2023-07-14 05:57, Christian König wrote: > Am 14.07.23 um 11:49 schrieb Asahi Lina: >

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-17 Thread Asahi Lina
On 18/07/2023 00.55, Christian König wrote: Am 15.07.23 um 16:14 schrieb aly...@rosenzweig.io: 15 July 2023 at 00:03, "Luben Tuikov" wrote: On 2023-07-14 05:57, Christian König wrote: Am 14.07.23 um 11:49 schrieb Asahi Lina: On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-17 Thread Christian König
Am 15.07.23 um 16:14 schrieb aly...@rosenzweig.io: 15 July 2023 at 00:03, "Luben Tuikov" wrote: On 2023-07-14 05:57, Christian König wrote: Am 14.07.23 um 11:49 schrieb Asahi Lina: On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-15 Thread alyssa
15 July 2023 at 00:03, "Luben Tuikov" wrote: > > On 2023-07-14 05:57, Christian König wrote: > > > > > Am 14.07.23 um 11:49 schrieb Asahi Lina: > > > > > > > > On 14/07/2023 17.43, Christian König wrote: > > > > > > > Am 14.07.23 um 10:21 schrieb Asahi Lina: > > A signaled scheduler

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Luben Tuikov
On 2023-07-14 05:57, Christian König wrote: > Am 14.07.23 um 11:49 schrieb Asahi Lina: >> On 14/07/2023 17.43, Christian König wrote: >>> Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are independencly reference counted.

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Asahi Lina
On 14/07/2023 19.18, Christian König wrote: Am 14.07.23 um 12:06 schrieb Asahi Lina: On 14/07/2023 18.57, Christian König wrote: Am 14.07.23 um 11:49 schrieb Asahi Lina: On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Christian König
Am 14.07.23 um 12:07 schrieb Asahi Lina: On 14/07/2023 18.51, Christian König wrote: Am 14.07.23 um 11:44 schrieb Asahi Lina: On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Christian König
Am 14.07.23 um 12:06 schrieb Asahi Lina: On 14/07/2023 18.57, Christian König wrote: Am 14.07.23 um 11:49 schrieb Asahi Lina: On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Asahi Lina
On 14/07/2023 18.51, Christian König wrote: Am 14.07.23 um 11:44 schrieb Asahi Lina: On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are independencly reference counted. Therefore, we can't

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Asahi Lina
On 14/07/2023 18.57, Christian König wrote: Am 14.07.23 um 11:49 schrieb Asahi Lina: On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are independencly reference counted. Therefore, we can't

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Christian König
Am 14.07.23 um 11:49 schrieb Asahi Lina: On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are independencly reference counted. Therefore, we can't reference the scheduler in the

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Christian König
Am 14.07.23 um 11:44 schrieb Asahi Lina: On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are independencly reference counted. Therefore, we can't reference the scheduler in the

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Asahi Lina
On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are independencly reference counted. Therefore, we can't reference the scheduler in the get_timeline_name() implementation. Fixes oopses on

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Asahi Lina
On 14/07/2023 17.43, Christian König wrote: Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are independencly reference counted. Therefore, we can't reference the scheduler in the get_timeline_name() implementation. Fixes oopses on

Re: [PATCH 2/3] drm/scheduler: Fix UAF in drm_sched_fence_get_timeline_name

2023-07-14 Thread Christian König
Am 14.07.23 um 10:21 schrieb Asahi Lina: A signaled scheduler fence can outlive its scheduler, since fences are independencly reference counted. Therefore, we can't reference the scheduler in the get_timeline_name() implementation. Fixes oopses on `cat /sys/kernel/debug/dma_buf/bufinfo` when