AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König via amd-gfx" <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
To: Alex Deucher
	<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: "Christian König"
	<ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Alex Deucher" <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH] drm/amdgpu: don't clamp debugfs register access to the BAR size
Date: Tue, 12 Feb 2019 11:15:04 +0100	[thread overview]
Message-ID: <f716fc19-02fa-da3d-1d35-ba0bb23d4629@gmail.com> (raw)
In-Reply-To: <20190211215221.31597-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>

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

      parent reply	other threads:[~2019-02-12 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f716fc19-02fa-da3d-1d35-ba0bb23d4629@gmail.com \
    --to=amd-gfx-pd4fty7x32lngt0pjobp9y5qc8qiuhrw@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox