All of lore.kernel.org
 help / color / mirror / Atom feed
* Shared and/or locked anonymous pages
@ 2006-09-28 14:24 girish
  0 siblings, 0 replies; only message in thread
From: girish @ 2006-09-28 14:24 UTC (permalink / raw)
  To: linux-mm; +Cc: girish

Hello.

I have a *very* basic question!

Is it legal to provide anonymous mapping on shared and/or locked pages in
user space?

I am trying to implement a Special VM area in the user space, which will map
the kernel I/O space. A straightforward & simple approach would be to go
through /dev/mem or /dev/kmem device. But I am trying to implement one
system call which will do the job of anonymous mapping.

Here is an algorithm I have in mind -
        struct vm_area_struct *vma = create_anon (current->mm, addr, size)
        struct page *pg = alloc_pages (nrpages, locked | shared)
        vma->vm_pgoff = page_to_pfn (pg)
        remap_pfn_range (vma... vma->vm_pgoff... Size... locked | shared)

Is it possible? If it is not - what is the reason?

Thanks.
Girish.
      


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-28 14:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-28 14:24 Shared and/or locked anonymous pages girish

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.