linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: girish <girishvg@gmail.com>
To: linux-mm <Linux-MM@kvack.org>
Cc: girish <girishvg@gmail.com>
Subject: Shared and/or locked anonymous pages
Date: Thu, 28 Sep 2006 23:24:59 +0900	[thread overview]
Message-ID: <C1420A4B.7BAF%girishvg@gmail.com> (raw)

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>

                 reply	other threads:[~2006-09-28 14:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C1420A4B.7BAF%girishvg@gmail.com \
    --to=girishvg@gmail.com \
    --cc=Linux-MM@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox