vmapping user pages - feasible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]