drm/amdgpu: don't clamp debugfs register access to the BAR size
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +0 -3
@@ -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);
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190211215221.31597-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Christian König via amd-gfx
Reviewed-by Christian KönigAm 11.02.19 um 22:52 schrieb Alex Deucher via amd-gfx:
Quoted 6 lines
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.
Signed-off-by Alex Deucher <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c static int amdgpu_debugfs_process_reg_op(bool read, struct file *f, · line 163
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +0
-3@@ -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);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx