Re: [PATCH 2/3] drm/amdgpu: support userptr cross VMAs case with HMM v3

2019-03-13 Thread Christian König
Acked-by: Christian König But I have the strong feeling that we sooner or later need to rewrite the whole stuff from scratch. Especially the struct amdgpu_ttm_tt structure now has a lot of superfluous stuff left. Christian. Am 13.03.19 um 02:47 schrieb Kuehling, Felix: This patch is

Re: [PATCH 2/3] drm/amdgpu: support userptr cross VMAs case with HMM v3

2019-03-12 Thread Kuehling, Felix
This patch is Reviewed-by: Felix Kuehling Regards,   Felix On 3/12/2019 9:17 PM, Yang, Philip wrote: > userptr may cross two VMAs if the forked child process (not call exec > after fork) malloc buffer, then free it, and then malloc larger size > buf, kerenl will create new VMA adjacent to old

Re: [PATCH 2/3] drm/amdgpu: support userptr cross VMAs case with HMM v2

2019-03-12 Thread Yang, Philip
Hi Felix, Submitted v3 to fix the potential problems with invalid userptr. Philip On 2019-03-12 3:30 p.m., Kuehling, Felix wrote: > See one comment inline. There are still some potential problems that > you're not catching. > > On 2019-03-06 9:42 p.m., Yang, Philip wrote: >> userptr may cross

[PATCH 2/3] drm/amdgpu: support userptr cross VMAs case with HMM v3

2019-03-12 Thread Yang, Philip
userptr may cross two VMAs if the forked child process (not call exec after fork) malloc buffer, then free it, and then malloc larger size buf, kerenl will create new VMA adjacent to old VMA which was cloned from parent process, some pages of userptr are in the first VMA, the rest pages are in the

Re: [PATCH 2/3] drm/amdgpu: support userptr cross VMAs case with HMM v2

2019-03-12 Thread Kuehling, Felix
See one comment inline. There are still some potential problems that you're not catching. On 2019-03-06 9:42 p.m., Yang, Philip wrote: > userptr may cross two VMAs if the forked child process (not call exec > after fork) malloc buffer, then free it, and then malloc larger size > buf, kerenl will

[PATCH 2/3] drm/amdgpu: support userptr cross VMAs case with HMM v2

2019-03-06 Thread Yang, Philip
userptr may cross two VMAs if the forked child process (not call exec after fork) malloc buffer, then free it, and then malloc larger size buf, kerenl will create new VMA adjacent to old VMA which was cloned from parent process, some pages of userptr are in the first VMA, the rest pages are in the

Re: [PATCH 2/3] drm/amdgpu: support userptr cross VMAs case with HMM

2019-03-06 Thread Yang, Philip
I will submit v2 to fix those issues. Some comments inline... On 2019-03-06 3:11 p.m., Kuehling, Felix wrote: > Some comments inline ... > > On 3/5/2019 1:09 PM, Yang, Philip wrote: >> userptr may cross two VMAs if the forked child process (not call exec >> after fork) malloc buffer, then free

Re: [PATCH 2/3] drm/amdgpu: support userptr cross VMAs case with HMM

2019-03-06 Thread Kuehling, Felix
Some comments inline ... On 3/5/2019 1:09 PM, Yang, Philip wrote: > userptr may cross two VMAs if the forked child process (not call exec > after fork) malloc buffer, then free it, and then malloc larger size > buf, kerenl will create new VMA adjacent to old VMA which was cloned > from parent

[PATCH 2/3] drm/amdgpu: support userptr cross VMAs case with HMM

2019-03-05 Thread Yang, Philip
userptr may cross two VMAs if the forked child process (not call exec after fork) malloc buffer, then free it, and then malloc larger size buf, kerenl will create new VMA adjacent to old VMA which was cloned from parent process, some pages of userptr are in the first VMA, the rest pages are in the