]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: validate user pitch alignment
authorYu Zhao <yuzhao@google.com>
Mon, 7 Jan 2019 22:51:14 +0000 (15:51 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Jan 2019 21:26:41 +0000 (16:26 -0500)
commitb8fba46a0d12ae9cd37a5568ec5508574e20735e
tree8558916273a97a04eed4c98ada96a5bbd9138777
parentbab0ab4700822c87b9e81c2b93fd3e7fe808e8bf
drm/amdgpu: validate user pitch alignment

Userspace may request pitch alignment that is not supported by GPU.
Some requests 32, but GPU ignores it and uses default 64 when cpp is
4. If GEM object is allocated based on the smaller alignment, GPU
DMA will go out of bound.

Cc: stable@vger.kernel.org # v4.2+
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c