All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: Chad Versace <chadversary@chromium.org>,
	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: Mon, 16 Jan 2017 20:24:19 -0200	[thread overview]
Message-ID: <20170116222419.GM16017@joana> (raw)
In-Reply-To: <20170113212751.GA27683@chadversary.pdx.corp.google.com>

2017-01-13 Chad Versace <chadversary@chromium.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

I pushed this patch to drm-misc-fixes. Thank you all.

Gustavo

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Gustavo Padovan <gustavo@padovan.org>
To: Chad Versace <chadversary@chromium.org>,
	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: Mon, 16 Jan 2017 20:24:19 -0200	[thread overview]
Message-ID: <20170116222419.GM16017@joana> (raw)
In-Reply-To: <20170113212751.GA27683@chadversary.pdx.corp.google.com>

2017-01-13 Chad Versace <chadversary@chromium.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

I pushed this patch to drm-misc-fixes. Thank you all.

Gustavo


  reply	other threads:[~2017-01-16 22:24 UTC|newest]

Thread overview: 9+ 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 14:22 ` Gustavo Padovan
2017-01-13 15:00 ` Laurent Pinchart
2017-01-13 15:00   ` Laurent Pinchart
2017-01-13 16:56   ` Gustavo Padovan
2017-01-13 21:27 ` Chad Versace
2017-01-13 21:27   ` Chad Versace
2017-01-16 22:24   ` Gustavo Padovan [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=20170116222419.GM16017@joana \
    --to=gustavo@padovan.org \
    --cc=chadversary@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.com \
    --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 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.