Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-20 Thread Mika Kuoppala
Joonas Lahtinen writes: > Quoting Joonas Lahtinen (2024-12-11 14:59:33) >> Quoting Christian König (2024-12-10 16:03:14) > > > >> > If you really want to expose an interface to userspace which walks the >> > process >> > page table, installs an MMU notifier, kmaps the resulting page and then >

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-17 Thread Joonas Lahtinen
Quoting Joonas Lahtinen (2024-12-11 14:59:33) > Quoting Christian König (2024-12-10 16:03:14) > > If you really want to expose an interface to userspace which walks the > > process > > page table, installs an MMU notifier, kmaps the resulting page and then > > memcpy > > to/from it then you ab

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-13 Thread Matthew Brost
On Thu, Dec 12, 2024 at 11:12:39AM +0100, Simona Vetter wrote: > On Thu, Dec 12, 2024 at 09:49:24AM +0100, Thomas Hellström wrote: > > On Mon, 2024-12-09 at 16:31 +0100, Simona Vetter wrote: > > > On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote: > > > > Am 09.12.24 um 14:33 schrieb

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-12 Thread Simona Vetter
On Thu, Dec 12, 2024 at 09:49:24AM +0100, Thomas Hellström wrote: > On Mon, 2024-12-09 at 16:31 +0100, Simona Vetter wrote: > > On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote: > > > Am 09.12.24 um 14:33 schrieb Mika Kuoppala: > > > > From: Andrzej Hajda > > > > > > > > Debugger n

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-12 Thread Thomas Hellström
On Mon, 2024-12-09 at 16:31 +0100, Simona Vetter wrote: > On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote: > > Am 09.12.24 um 14:33 schrieb Mika Kuoppala: > > > From: Andrzej Hajda > > > > > > Debugger needs to read/write program's vmas including > > > userptr_vma. > > > Since hmm

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-11 Thread Joonas Lahtinen
First of all, do appreciate taking the time to explain your positions much more verbosely this time. Quoting Christian König (2024-12-10 16:03:14) > Am 10.12.24 um 12:57 schrieb Joonas Lahtinen: > > Quoting Christian König (2024-12-10 12:00:48) > > Am 10.12.24 um 10:33 schrieb Joonas

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-10 Thread Christian König
Am 10.12.24 um 12:57 schrieb Joonas Lahtinen: Quoting Christian König (2024-12-10 12:00:48) Am 10.12.24 um 10:33 schrieb Joonas Lahtinen: Quoting Christian König (2024-12-09 17:42:32) Am 09.12.24 um 16:31 schrieb Simona Vetter: On Mon, Dec 09, 2024 at 03:03:04PM +01

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-10 Thread Joonas Lahtinen
Quoting Christian König (2024-12-10 12:00:48) > Am 10.12.24 um 10:33 schrieb Joonas Lahtinen: > > Quoting Christian König (2024-12-09 17:42:32) > > Am 09.12.24 um 16:31 schrieb Simona Vetter: > > On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote: > >

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-10 Thread Simona Vetter
On Mon, Dec 09, 2024 at 04:42:32PM +0100, Christian König wrote: > Am 09.12.24 um 16:31 schrieb Simona Vetter: > > On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote: > > > Am 09.12.24 um 14:33 schrieb Mika Kuoppala: > > > > From: Andrzej Hajda > > > > > > > > Debugger needs to read/

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-10 Thread Christian König
Am 10.12.24 um 10:33 schrieb Joonas Lahtinen: Quoting Christian König (2024-12-09 17:42:32) Am 09.12.24 um 16:31 schrieb Simona Vetter: On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote: Am 09.12.24 um 14:33 schrieb Mika Kuoppala: From: Andrzej Hajda Debugger needs to read/writ

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-10 Thread Joonas Lahtinen
Quoting Christian König (2024-12-09 17:42:32) > Am 09.12.24 um 16:31 schrieb Simona Vetter: > > On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote: > >> Am 09.12.24 um 14:33 schrieb Mika Kuoppala: > >>> From: Andrzej Hajda > >>> > >>> Debugger needs to read/write program's vmas includ

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-09 Thread Simona Vetter
On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote: > Am 09.12.24 um 14:33 schrieb Mika Kuoppala: > > From: Andrzej Hajda > > > > Debugger needs to read/write program's vmas including userptr_vma. > > Since hmm_range_fault is used to pin userptr vmas, it is possible > > to map those

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-09 Thread Christian König
Am 09.12.24 um 16:42 schrieb Christian König: Am 09.12.24 um 16:31 schrieb Simona Vetter: On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote: Am 09.12.24 um 14:33 schrieb Mika Kuoppala: From: Andrzej Hajda Debugger needs to read/write program's vmas including userptr_vma. Since

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-09 Thread Christian König
Am 09.12.24 um 16:31 schrieb Simona Vetter: On Mon, Dec 09, 2024 at 03:03:04PM +0100, Christian König wrote: Am 09.12.24 um 14:33 schrieb Mika Kuoppala: From: Andrzej Hajda Debugger needs to read/write program's vmas including userptr_vma. Since hmm_range_fault is used to pin userptr vmas, it

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-09 Thread Joonas Lahtinen
(+ Thomas and Matt B who this was reviewed with as a concept) Quoting Christian König (2024-12-09 16:03:04) > Am 09.12.24 um 14:33 schrieb Mika Kuoppala: > > +int xe_vm_userptr_access(struct xe_userptr_vma *uvma, u64 offset, > > + void *buf, u64 len, bool write) > > +{ > >

Re: [PATCH 14/26] drm/xe/eudebug: implement userptr_vma access

2024-12-09 Thread Christian König
Am 09.12.24 um 14:33 schrieb Mika Kuoppala: From: Andrzej Hajda Debugger needs to read/write program's vmas including userptr_vma. Since hmm_range_fault is used to pin userptr vmas, it is possible to map those vmas from debugger context. Oh, this implementation is extremely questionable as we