From: Jeff Dike <jdike@addtoit.com>
To: madiyaan@fastmail.fm
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] accessing host resources from inside the UML kernel
Date: Wed, 17 Oct 2007 12:07:18 -0400 [thread overview]
Message-ID: <20071017160718.GG9497@c2.user-mode-linux.org> (raw)
In-Reply-To: <BLU102-W37724FC51969103D82EFACA9A10@phx.gbl>
On Sat, Oct 13, 2007 at 04:56:39AM +0000, Ahmad Sharif wrote:
> I know this might be counter-intuitive and completely in the
> opposite direction of what people use UML for, but I have a question
> regarding accessing host's files from within UML (from the UML kernel,
> not user). Having said that, this is what I want:
I've long advocated taking a more flexible view about sharing
resources between UML and the host.
> I want to write a kernel module that I load from inside a running
> UML using insmod that will be able to call functions like mmap(),
> ftok() etc. Here is the important part: these functions should use
> the *host's* kernel, not the UML's. This is because I want to do
> some IPC with another regular process that is running on the
> host. Here is the summary of what I want to do: the host is running
> one regular process and UML, and from within the UML's kernel, I
> want to access the host's resources (like shared files and such).
If you write a kernel module and stick it into UML, any system calls
that it makes will operate on the host, not UML. This is the
difference between UML kernel mode and user mode - userspace has its
system calls intercepted and run inside UML, while kernelspace has its
system calls run on the host.
> If I compile a program from within UML and use the function mmap(),
> it will link to mmap() implementation that is virtualized by
> UML. Instead, I want the real mmap() function (the host's mmap()
> function). Obviously because of UML's design this shouldn't be
> possible from the user-space within UML... I am aware of that, which
> is why I said that my UML kernel module will have this functionality
> of doing IPC with another process running on the host.
A module will automatically do what you want.
Jeff
--
Work email - jdike at linux dot intel dot com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
prev parent reply other threads:[~2007-10-17 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-13 4:56 [uml-devel] accessing host resources from inside the UML kernel Ahmad Sharif
2007-10-17 16:07 ` Jeff Dike [this message]
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=20071017160718.GG9497@c2.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=madiyaan@fastmail.fm \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.