[Intel-gfx] [PATCH 1/3] drm/i915: Added a new 'I915_CPU_MAP_NOT_NEEDED' flag to gem_create ioctl.

Gupta, Sourab sourab.gupta at intel.com
Fri Mar 7 11:56:16 CET 2014

Hi Chris,

For the issue of clearing of stolen pages, we have a patch which does memset of stolen objs  after
allocation, before handing the objs back over to userspace. We can apply this patch and send it in next version.


-----Original Message-----
From: Chris Wilson [mailto:chris at chris-wilson.co.uk] 
Sent: Friday, March 07, 2014 3:36 PM
To: Gupta, Sourab
Cc: intel-gfx at lists.freedesktop.org; Vetter, Daniel; Wilson, Chris; Goel, Akash
Subject: Re: [PATCH 1/3] drm/i915: Added a new 'I915_CPU_MAP_NOT_NEEDED' flag to gem_create ioctl.

On Fri, Mar 07, 2014 at 03:29:25PM +0530, sourab.gupta at intel.com wrote:
> From: Sourab Gupta <sourab.gupta at intel.com>
> Adding the flag 'I915_CPU_MAP_NOT_NEEDED' to gem_create ioctl.
> This is to indicate the driver that direct cpu access to this buffer 
> object is not needed and hence Driver can opt to use Stolen area as a 
> backing store for it. When this flag is set, try to allocate the 
> objects from Stolen area. Fallback to shmem in case of allocation 
> failure.

Besides the issue of
http://blog.ffwll.ch/2013/11/botching-up-ioctls.html, this has an information leak that we are not clearing the stolen pages. Danny got extremely fussy over that when I sent this code almost 9 months ago.

Chris Wilson, Intel Open Source Technology Centre

More information about the Intel-gfx mailing list