Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-23 Thread Christian König
Am 23.07.21 um 11:00 schrieb Daniel Vetter: On Fri, Jul 23, 2021 at 10:33:48AM +0200, Christian König wrote: Am 23.07.21 um 10:21 schrieb Daniel Vetter: On Wed, Jul 14, 2021 at 10:51 AM Christian König wrote: Am 13.07.21 um 17:28 schrieb Alex Deucher: On Tue, Jul 13, 2021 at 2:57 AM Christ

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-23 Thread Daniel Vetter
On Fri, Jul 23, 2021 at 10:33:48AM +0200, Christian König wrote: > > > Am 23.07.21 um 10:21 schrieb Daniel Vetter: > > On Wed, Jul 14, 2021 at 10:51 AM Christian König > > wrote: > > > > > > > > > Am 13.07.21 um 17:28 schrieb Alex Deucher: > > > > On Tue, Jul 13, 2021 at 2:57 AM Christian Köni

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-23 Thread Christian König
Am 23.07.21 um 10:21 schrieb Daniel Vetter: On Wed, Jul 14, 2021 at 10:51 AM Christian König wrote: Am 13.07.21 um 17:28 schrieb Alex Deucher: On Tue, Jul 13, 2021 at 2:57 AM Christian König wrote: Am 13.07.21 um 00:06 schrieb Felix Kuehling: KFD Thunk maps invisible VRAM BOs with PRO

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-23 Thread Daniel Vetter
On Wed, Jul 14, 2021 at 10:51 AM Christian König wrote: > > > > Am 13.07.21 um 17:28 schrieb Alex Deucher: > > On Tue, Jul 13, 2021 at 2:57 AM Christian König > > wrote: > >> > >> > >> Am 13.07.21 um 00:06 schrieb Felix Kuehling: > >>> KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-14 Thread Felix Kuehling
Am 2021-07-14 um 6:51 a.m. schrieb Christian König: > Am 14.07.21 um 12:44 schrieb Daniel Vetter: >> On Mon, Jul 12, 2021 at 06:06:36PM -0400, Felix Kuehling wrote: >>> KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. >>> is_cow_mapping returns true for these mappings. Add a check for

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-14 Thread Christian König
Am 14.07.21 um 13:15 schrieb Daniel Vetter: On Wed, Jul 14, 2021 at 12:51:15PM +0200, Christian König wrote: Am 14.07.21 um 12:44 schrieb Daniel Vetter: On Mon, Jul 12, 2021 at 06:06:36PM -0400, Felix Kuehling wrote: KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-14 Thread Daniel Vetter
On Wed, Jul 14, 2021 at 12:51:15PM +0200, Christian König wrote: > Am 14.07.21 um 12:44 schrieb Daniel Vetter: > > On Mon, Jul 12, 2021 at 06:06:36PM -0400, Felix Kuehling wrote: > > > KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. > > > is_cow_mapping returns true for these mapping

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-14 Thread Christian König
Am 14.07.21 um 12:44 schrieb Daniel Vetter: On Mon, Jul 12, 2021 at 06:06:36PM -0400, Felix Kuehling wrote: KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings. Add a check for vm_flags & VM_WRITE to avoid mmap failures on private read-on

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-14 Thread Daniel Vetter
On Wed, Jul 14, 2021 at 12:44:00PM +0200, Daniel Vetter wrote: > On Mon, Jul 12, 2021 at 06:06:36PM -0400, Felix Kuehling wrote: > > KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. > > is_cow_mapping returns true for these mappings. Add a check for > > vm_flags & VM_WRITE to avoid mm

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-14 Thread Daniel Vetter
On Mon, Jul 12, 2021 at 06:06:36PM -0400, Felix Kuehling wrote: > KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. > is_cow_mapping returns true for these mappings. Add a check for > vm_flags & VM_WRITE to avoid mmap failures on private read-only or > PROT_NONE mappings. > > v2: prot

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-14 Thread Christian König
Am 13.07.21 um 17:28 schrieb Alex Deucher: On Tue, Jul 13, 2021 at 2:57 AM Christian König wrote: Am 13.07.21 um 00:06 schrieb Felix Kuehling: KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings. Add a check for vm_flags & VM_WRITE

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-13 Thread Felix Kuehling
Am 2021-07-13 um 2:57 a.m. schrieb Christian König: > > > Am 13.07.21 um 00:06 schrieb Felix Kuehling: >> KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. >> is_cow_mapping returns true for these mappings. Add a check for >> vm_flags & VM_WRITE to avoid mmap failures on private read-o

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-13 Thread Alex Deucher
On Tue, Jul 13, 2021 at 2:57 AM Christian König wrote: > > > > Am 13.07.21 um 00:06 schrieb Felix Kuehling: > > KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. > > is_cow_mapping returns true for these mappings. Add a check for > > vm_flags & VM_WRITE to avoid mmap failures on priva

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-12 Thread Christian König
Am 13.07.21 um 00:06 schrieb Felix Kuehling: KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings. Add a check for vm_flags & VM_WRITE to avoid mmap failures on private read-only or PROT_NONE mappings. v2: protect against mprotect makin

[PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-12 Thread Felix Kuehling
KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings. Add a check for vm_flags & VM_WRITE to avoid mmap failures on private read-only or PROT_NONE mappings. v2: protect against mprotect making a mapping writable after the fact v3: update dri