summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2019-02-11 16:49:47 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-02-13 17:51:41 -0500
commit7a5e0d9ab6d9564f5f82d7a16355118aadd25ef8 (patch)
tree2cfe89645e58c52dd134b7999ab1b67a7c13ce5d
parent9b49c19766a854feefa7fe5288c1915658a939f5 (diff)
downloadlinux-7a5e0d9ab6d9564f5f82d7a16355118aadd25ef8.tar.bz2
drm/amdgpu: don't clamp debugfs register access to the BAR size
This prevents us from accessing extended registers in tools like umr. The register access functions already check if the offset is beyond the BAR size and use the indirect accessors with locking so this is safe. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index dd9a4fb9ce39..4ae3ff9a1d4c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -158,9 +158,6 @@ static int amdgpu_debugfs_process_reg_op(bool read, struct file *f,
while (size) {
uint32_t value;
- if (*pos > adev->rmmio_size)
- goto end;
-
if (read) {
value = RREG32(*pos >> 2);
r = put_user(value, (uint32_t *)buf);