linux - How to access tmpfs file under /dev/shm, created by user-space process, in a kernel module? -
i created file under /dev/shm (tmpfs) user-space, mmap'd file process address space , pushed contents. now, how map file again under kernel virtual address space access contents written user-space process. of course know how read using filp_open() , vfs_read(), want access contents using direct memory pointers similar mmap() user-space processes. want similar what's in mm/shmem.c, instead of doing mapping between user-space vma , /sysvxxx file, want kernel virtual address vma instead. can in that?
thanks..
only code implements tmpfs
knows files' memory is.
you have implement own fs, or use 1 allows define own mmap
implementation (like procfs
or sysfs
).
Comments
Post a Comment