drm/amdgpu: fix user fence handling once more
authorChristian König <christian.koenig@amd.com>
Wed, 29 Jun 2016 11:26:41 +0000 (13:26 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Jul 2016 19:06:09 +0000 (15:06 -0400)
commitb5f5acbc87052e1bd8ada6915e1dedd856da767d
tree0892fd1a08ab03f5ff5fc074685c8294ba34166f
parent566281595037a6f5932adbf8e04d3a63e7687fd7
drm/amdgpu: fix user fence handling once more

Same problem as with the VM page tables. The user fence address must be
determined before the job is scheduled, not when the IB is executed.

This fixes a security problem where user fences could be used to overwrite
any part of VRAM.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c