linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* user space virtual address to a vm_area_struct
@ 2002-10-16  9:10 Melkor Ainur
  2002-10-16 11:13 ` Brian Gerst
  0 siblings, 1 reply; 2+ messages in thread
From: Melkor Ainur @ 2002-10-16  9:10 UTC (permalink / raw)
  To: linux-kernel

Hi,

Is there a recommended way for a driver to take an
application provided virtual address while executing
in the syscall context of that same application and
find the corresponding vm_area_struct (if exists for
that address) that spans that virtual address?

Melkor

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

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

* Re: user space virtual address to a vm_area_struct
  2002-10-16  9:10 user space virtual address to a vm_area_struct Melkor Ainur
@ 2002-10-16 11:13 ` Brian Gerst
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Gerst @ 2002-10-16 11:13 UTC (permalink / raw)
  To: Melkor Ainur; +Cc: linux-kernel

Melkor Ainur wrote:
> Hi,
> 
> Is there a recommended way for a driver to take an
> application provided virtual address while executing
> in the syscall context of that same application and
> find the corresponding vm_area_struct (if exists for
> that address) that spans that virtual address?
> 
> Melkor

down_read(current->mm->mmap_sem);
vma = find_vma(current->mm, address);
...
up_read(current->mm->mmap_sem);

--
				Brian Gerst



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

end of thread, other threads:[~2002-10-16 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-16  9:10 user space virtual address to a vm_area_struct Melkor Ainur
2002-10-16 11:13 ` Brian Gerst

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