linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* giving access of one process's memory to another via kernel module
@ 2019-05-30 14:41 Thanos Makatos
  0 siblings, 0 replies; only message in thread
From: Thanos Makatos @ 2019-05-30 14:41 UTC (permalink / raw)
  To: linux-mm

I'm prototyping a device driver that is backed by a userspace process (server) instead of a physical device. When a user process (client) submits an I/O, I want the server to have access to that memory.
 
I've tried pinning the client pages (get_user_pages_fast) and inserting them in the server's VM (with vm_insert_page while serving an mmap call from this context).
 
This works if the client allocated memory with MAP_SHARED. If not, vm_insert_page fails with EINVAL (probably because the client's page has PageAnon=1 set).
 
A real device would have access to this memory. Is there a way to make a virtual device (my server, implemented in a separate userspace context) have access to it?
 
PS. I haven't managed to register to the list so please CC me to your replies


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

only message in thread, other threads:[~2019-05-30 14:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 14:41 giving access of one process's memory to another via kernel module Thanos Makatos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox