Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-05-16 Thread Daniel Vetter
On Fri, May 16, 2014 at 08:34:52AM -0700, Volkin, Bradley D wrote: > Reviewed-by: Brad Volkin > > On Fri, May 16, 2014 at 02:22:37PM +0100, Chris Wilson wrote: > > By exporting the ability to map user address and inserting PTEs > > representing their backing pages into the GTT, we can exploit UM

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-05-16 Thread Volkin, Bradley D
Reviewed-by: Brad Volkin On Fri, May 16, 2014 at 02:22:37PM +0100, Chris Wilson wrote: > By exporting the ability to map user address and inserting PTEs > representing their backing pages into the GTT, we can exploit UMA in order > to utilize normal application data as a texture source or even a

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-05-16 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses, w

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-02-05 Thread Jesse Barnes
On Tue, 4 Feb 2014 11:56:47 +0100 Daniel Vetter wrote: > On Mon, Feb 03, 2014 at 03:28:37PM +, Tvrtko Ursulin wrote: > > > > On 01/29/2014 08:34 PM, Daniel Vetter wrote: > > >Actually I've found something else to complain about: > > > > > >On Tue, Jan 28, 2014 at 2:16 PM, Chris Wilson > >

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-02-04 Thread Daniel Vetter
On Mon, Feb 03, 2014 at 03:28:37PM +, Tvrtko Ursulin wrote: > > On 01/29/2014 08:34 PM, Daniel Vetter wrote: > >Actually I've found something else to complain about: > > > >On Tue, Jan 28, 2014 at 2:16 PM, Chris Wilson > >wrote: > >>+#define I915_USERPTR_READ_ONLY 0x1 > > > >This smells like

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-02-03 Thread Tvrtko Ursulin
On 01/30/2014 11:06 AM, Chris Wilson wrote: On Wed, Jan 29, 2014 at 10:58:48PM +0100, Daniel Vetter wrote: On Wed, Jan 29, 2014 at 10:53 PM, Chris Wilson wrote: On Wed, Jan 29, 2014 at 09:25:51PM +0100, Daniel Vetter wrote: So originally I've thought we need this due to the massive overhead o

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-02-03 Thread Tvrtko Ursulin
On 01/29/2014 08:34 PM, Daniel Vetter wrote: Actually I've found something else to complain about: On Tue, Jan 28, 2014 at 2:16 PM, Chris Wilson wrote: +#define I915_USERPTR_READ_ONLY 0x1 This smells like an insta-root-exploit: 1. mmap /lib/ld-linux.so as read-only 2. userptr bind that mmap

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-30 Thread Chris Wilson
On Wed, Jan 29, 2014 at 10:58:48PM +0100, Daniel Vetter wrote: > On Wed, Jan 29, 2014 at 10:53 PM, Chris Wilson > wrote: > > On Wed, Jan 29, 2014 at 09:25:51PM +0100, Daniel Vetter wrote: > >> So originally I've thought we need this due to the massive overhead of the > >> mmu notifier. But now wi

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-29 Thread Daniel Vetter
On Wed, Jan 29, 2014 at 10:53 PM, Chris Wilson wrote: > On Wed, Jan 29, 2014 at 09:25:51PM +0100, Daniel Vetter wrote: >> So originally I've thought we need this due to the massive overhead of the >> mmu notifier. But now with the nice shared mmu notifiers I've thought that >> overhead is gone I p

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-29 Thread Chris Wilson
On Wed, Jan 29, 2014 at 09:25:51PM +0100, Daniel Vetter wrote: > So originally I've thought we need this due to the massive overhead of the > mmu notifier. But now with the nice shared mmu notifiers I've thought that > overhead is gone I prefer to also ditch this option. > > Same goes about the MM

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-29 Thread Chris Wilson
On Wed, Jan 29, 2014 at 09:34:42PM +0100, Daniel Vetter wrote: > Actually I've found something else to complain about: > > On Tue, Jan 28, 2014 at 2:16 PM, Chris Wilson > wrote: > > +#define I915_USERPTR_READ_ONLY 0x1 > > This smells like an insta-root-exploit: > 1. mmap /lib/ld-linux.so as rea

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-29 Thread Daniel Vetter
Actually I've found something else to complain about: On Tue, Jan 28, 2014 at 2:16 PM, Chris Wilson wrote: > +#define I915_USERPTR_READ_ONLY 0x1 This smells like an insta-root-exploit: 1. mmap /lib/ld-linux.so as read-only 2. userptr bind that mmap'ed area as READ_ONLY 3. blit exploit code over

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-29 Thread Daniel Vetter
On Tue, Jan 28, 2014 at 01:16:46PM +, Chris Wilson wrote: > By exporting the ability to map user address and inserting PTEs > representing their backing pages into the GTT, we can exploit UMA in order > to utilize normal application data as a texture source or even as a > render target (dependi

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-28 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses, w

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-27 Thread Chris Wilson
On Mon, Jan 27, 2014 at 09:56:12AM -0800, Volkin, Bradley D wrote: > > +static void > > +i915_mmu_notifier_del(struct i915_mmu_notifier *mmu, > > + struct i915_mmu_object *mn) > > +{ > > + bool destroy; > > + > > + spin_lock(&mmu->lock); > > + interval_tree_remove(&mn->it, &mm

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-27 Thread Volkin, Bradley D
Hi Chris, A few questions/comments throughout. I may be off the mark on some. Please bear with me as I try to get more familiar with the gem code. Thanks, Brad [ snip ] On Fri, Jan 24, 2014 at 01:00:19AM -0800, Chris Wilson wrote: > +static void > +__i915_mmu_notifier_destroy_worker(struct work

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-24 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses, w

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-22 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses, w

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-15 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses, w

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-08-14 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses, w

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-06-24 Thread Jesse Barnes
On Mon, 8 Apr 2013 21:24:58 +0200 Daniel Vetter wrote: > On Mon, Apr 8, 2013 at 7:40 PM, Chris Wilson wrote: > > On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: > >> On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: > >> > By exporting the ability to map user address a

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-15 Thread Daniel Vetter
On Mon, Apr 8, 2013 at 11:48 PM, Chris Wilson wrote: > On Mon, Apr 08, 2013 at 09:24:58PM +0200, Daniel Vetter wrote: >> On Mon, Apr 8, 2013 at 7:40 PM, Chris Wilson >> wrote: >> > On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: >> >> On Tue, Feb 12, 2013 at 02:17:22PM +, Chri

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-08 Thread Eric Anholt
Daniel Vetter writes: > On Mon, Apr 8, 2013 at 7:40 PM, Chris Wilson wrote: >> On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: >>> On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: >>> > By exporting the ability to map user address and inserting PTEs >>> > representing

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-08 Thread Chris Wilson
On Mon, Apr 08, 2013 at 09:24:58PM +0200, Daniel Vetter wrote: > On Mon, Apr 8, 2013 at 7:40 PM, Chris Wilson wrote: > > On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: > >> On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: > >> > By exporting the ability to map user add

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-08 Thread Daniel Vetter
On Mon, Apr 8, 2013 at 7:40 PM, Chris Wilson wrote: > On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: >> On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: >> > By exporting the ability to map user address and inserting PTEs >> > representing their backing pages into the

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-08 Thread Chris Wilson
On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: > On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: > > By exporting the ability to map user address and inserting PTEs > > representing their backing pages into the GTT, we can exploit UMA in order > > to utilize normal app

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-08 Thread Daniel Vetter
On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: > By exporting the ability to map user address and inserting PTEs > representing their backing pages into the GTT, we can exploit UMA in order > to utilize normal application data as a texture source or even as a > render target (dependi

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-02-13 Thread Chris Wilson
On Wed, Feb 13, 2013 at 10:24:59PM +, Reese, Armin C wrote: > Thanks for the patch, Chris. > > This is exactly what we were looking for to replace the VMAP feature you > submitted a couple of years ago. We need a method to quickly move data from > user mode allocations into video memory (by

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-02-13 Thread Reese, Armin C
] On Behalf Of Chris Wilson Sent: Tuesday, February 12, 2013 6:17 AM To: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl By exporting the ability to map user address and inserting PTEs representing their

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-02-12 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses, w