linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Gem GTT mmaps..
@ 2009-02-04 22:32 Thomas Hellström
  2009-02-04 23:02 ` Jesse Barnes
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Hellström @ 2009-02-04 22:32 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: DRI, Linux Kernel

Jesse,

I have some concerns about the GEM GTT mmap functionality.

First, a gem object pointer is copied to map->offset and then to the 
vma->vm_private_data without proper reference counting. This pointer is 
used in i915_gem_fault() to access the gem object. However if the gem 
object is destroyed and a process then tries to access data in a vma 
mapping the (now destroyed) object, it would dereference a stale pointer 
into kernel space? Shouldn't those pointers be reference counted, and to 
account for fork(), a vm open and close would be needed to  reference 
count corresponding pointers of newly created and destroyed vmas?

Second, the i915_gem_fault method  returns VM_FAULT_SIGBUS if 
vm_insert_pfn() fails with an -EBUSY. I think that's an error, since 
that would indicate that the pte was already populated by a racing thread.

/Thomas





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-02-11 22:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-04 22:32 Gem GTT mmaps Thomas Hellström
2009-02-04 23:02 ` Jesse Barnes
2009-02-04 23:42   ` Eric Anholt
2009-02-05 18:37     ` Jesse Barnes
2009-02-06 17:14       ` Jesse Barnes
2009-02-06 21:35         ` Thomas Hellström
2009-02-06 22:24           ` Jesse Barnes
2009-02-06 22:39             ` Thomas Hellström
2009-02-06 23:22               ` Jesse Barnes
2009-02-07  0:52             ` Chris Wilson
2009-02-11 22:01               ` Jesse Barnes
2009-02-07  8:06             ` Xavier Bestel
2009-02-10 22:00             ` Eric Anholt
2009-02-10 22:58               ` Jesse Barnes

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).