* [PATCH] drm/amdgpu: don't clamp debugfs register access to the BAR size
@ 2019-02-11 21:52 Alex Deucher via amd-gfx
[not found] ` <20190211215221.31597-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Alex Deucher via amd-gfx @ 2019-02-11 21:52 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
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 <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 ---
1 file changed, 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);
--
2.20.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu: don't clamp debugfs register access to the BAR size
[not found] ` <20190211215221.31597-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2019-02-12 10:15 ` Christian König via amd-gfx
0 siblings, 0 replies; 2+ messages in thread
From: Christian König via amd-gfx @ 2019-02-12 10:15 UTC (permalink / raw)
To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Christian König, Alex Deucher
Am 11.02.19 um 22:52 schrieb Alex Deucher via amd-gfx:
> 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 <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 ---
> 1 file changed, 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);
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-12 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 21:52 [PATCH] drm/amdgpu: don't clamp debugfs register access to the BAR size Alex Deucher via amd-gfx
[not found] ` <20190211215221.31597-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-02-12 10:15 ` Christian König via amd-gfx
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.