From: Thanos Makatos <thanos.makatos@nutanix.com>
To: linux-mm <linux-mm@kvack.org>
Subject: giving access of one process's memory to another via kernel module
Date: Thu, 30 May 2019 14:41:50 +0000 [thread overview]
Message-ID: <MN2PR02MB62059A7369140242963542088B180@MN2PR02MB6205.namprd02.prod.outlook.com> (raw)
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
reply other threads:[~2019-05-30 14:41 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=MN2PR02MB62059A7369140242963542088B180@MN2PR02MB6205.namprd02.prod.outlook.com \
--to=thanos.makatos@nutanix.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