From: Akhil P Oommen <akhilpo@codeaurora.org>
To: Rob Clark <robdclark@gmail.com>, dri-devel@lists.freedesktop.org
Cc: Rob Clark <robdclark@chromium.org>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<freedreno@lists.freedesktop.org>,
David Airlie <airlied@linux.ie>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<linux-arm-msm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"Kristian H. Kristensen" <hoegsberg@google.com>,
Sean Paul <sean@poorly.run>,
Emil Velikov <emil.velikov@collabora.com>
Subject: Re: [PATCH] drm/msm: Fix legacy relocs path
Date: Fri, 5 Feb 2021 12:11:10 +0530 [thread overview]
Message-ID: <dc2fb87e-67f0-4fa9-c920-515a6609a04d@codeaurora.org> (raw)
In-Reply-To: <20210204225650.1284384-1-robdclark@gmail.com>
On 2/5/2021 4:26 AM, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
>
> In moving code around, we ended up using the same pointer to
> copy_from_user() the relocs tables as we used for the cmd table
> entry, which is clearly not right. This went unnoticed because
> modern mesa on non-ancent kernels does not actually use relocs.
> But this broke ancient mesa on modern kernels.
>
> Reported-by: Emil Velikov <emil.velikov@collabora.com>
> Fixes: 20224d715a88 ("drm/msm/submit: Move copy_from_user ahead of locking bos")
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
> drivers/gpu/drm/msm/msm_gem_submit.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
> index d04c349d8112..5480852bdeda 100644
> --- a/drivers/gpu/drm/msm/msm_gem_submit.c
> +++ b/drivers/gpu/drm/msm/msm_gem_submit.c
> @@ -198,6 +198,8 @@ static int submit_lookup_cmds(struct msm_gem_submit *submit,
> submit->cmd[i].idx = submit_cmd.submit_idx;
> submit->cmd[i].nr_relocs = submit_cmd.nr_relocs;
>
> + userptr = u64_to_user_ptr(submit_cmd.relocs);
> +
> sz = array_size(submit_cmd.nr_relocs,
> sizeof(struct drm_msm_gem_submit_reloc));
> /* check for overflow: */
>
Reviewed-by: Akhil P Oommen <akhilpo@codeaurora.org>
-Akhil.
next prev parent reply other threads:[~2021-02-05 6:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 22:56 [PATCH] drm/msm: Fix legacy relocs path Rob Clark
2021-02-05 6:41 ` Akhil P Oommen [this message]
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
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=dc2fb87e-67f0-4fa9-c920-515a6609a04d@codeaurora.org \
--to=akhilpo@codeaurora.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.velikov@collabora.com \
--cc=freedreno@lists.freedesktop.org \
--cc=hoegsberg@google.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
/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;
as well as URLs for NNTP newsgroup(s).