From: Zenek <zenblu@wp.pl>
To: linux-mm@kvack.org
Subject: vmapping user pages - feasible?
Date: Thu, 25 Feb 2010 20:05:14 +0000 (UTC) [thread overview]
Message-ID: <hm6l5q$rqp$1@dough.gmane.org> (raw)
Hello,
my kernel driver gets a userspace pointer to a memory area (virtually
contiguous), allocated by userspace. I would like to use that memory in a
vmalloc-like manner, i.e. I want it to be:
- accessible from kernel
- contiguous in virtual address space
- I may need access from interrupt context as well.
I will be writing to it using the CPU only, in kernel mode.
I understand that:
- no page pinning is required (as only the CPU will be writing to that
area)
- I would be able to use that memory even directly without vmapping, but
only if I didn't want to access it from interrupt context and as long as
it'd be mapped below highmem?
There will be no multithreaded access to that memory.
If the userspace free()s the memory, I still have the pages unless I
vunmap() them, right?
How should I go about it? Get the user's vm_area_struct, go through all
the pages, construct an array of struct *page and vmap it?
Thank you!
Zenek Blus
--
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>
next reply other threads:[~2010-02-25 20:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 20:05 Zenek [this message]
2010-02-25 20:58 ` Christoph Lameter
2010-02-25 21:22 ` Zenek
2010-02-25 21:38 ` Zenek
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='hm6l5q$rqp$1@dough.gmane.org' \
--to=zenblu@wp.pl \
--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