From: Chad Versace <chadversary@chromium.org>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: dri-devel@lists.freedesktop.org,
Gustavo Padovan <gustavo.padovan@collabora.com>,
stable@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH] drm/fence: fix memory overwrite when setting out_fence fd
Date: Fri, 13 Jan 2017 13:27:51 -0800 [thread overview]
Message-ID: <20170113212751.GA27683@chadversary.pdx.corp.google.com> (raw)
In-Reply-To: <1484317329-9293-1-git-send-email-gustavo@padovan.org>
On Fri 13 Jan 2017, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.com>
>
> Currently if the userspace declares a int variable to store the out_fence
> fd and pass it to OUT_FENCE_PTR the kernel will overwrite the 32 bits
> above the int variable on 64 bits systems.
>
> Fix this by making the internal storage of out_fence in the kernel a s32
> pointer.
>
> Reported-by: Chad Versace <chadversary@chromium.org>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Rafael Antognolli <rafael.antognolli@intel.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: stable@vger.kernel.org
Reviewed-and-Tested-by: Chad Versace <chadversary@chromium.org>
I applied this to my kernel branch, updated kmscube, and the spinning cube still looks good.
For reference, here are the tags I tested with:
mesa: http://git.kiwitree.net/cgit/~chadv/mesa/tag/?h=chadv/review/i965-exec-fence-v03
libdrm: http://git.kiwitree.net/cgit/~chadv/libdrm/tag/?h=chadv/review/intel-exec-fence-v01
linux: http://git.kiwitree.net/cgit/~chadv/linux/tag/?h=chadv/test/i915-exec-fence-v04
kmscube: http://git.kiwitree.net/cgit/~chadv/kmscube/tag/?h=chadv/test/fences-v03
next prev parent reply other threads:[~2017-01-13 21:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 14:22 [PATCH] drm/fence: fix memory overwrite when setting out_fence fd Gustavo Padovan
2017-01-13 15:00 ` Laurent Pinchart
2017-01-13 16:56 ` Gustavo Padovan
2017-01-13 21:27 ` Chad Versace [this message]
2017-01-16 22:24 ` Gustavo Padovan
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=20170113212751.GA27683@chadversary.pdx.corp.google.com \
--to=chadversary@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.com \
--cc=gustavo@padovan.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=stable@vger.kernel.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