From: Jeff Dike <jdike@addtoit.com>
To: Krishnappa Abhijith-A21204 <abhijith@motorola.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] Regarding System call virtualization
Date: Mon, 19 Mar 2007 13:36:29 -0400 [thread overview]
Message-ID: <20070319173629.GA11790@c2.user-mode-linux.org> (raw)
In-Reply-To: <0A01463223B8164194908CAC85B66A1201AD3E2E@ZMY16EXM67.ds.mot.com>
On Mon, Mar 19, 2007 at 10:38:27AM +0800, Krishnappa Abhijith-A21204 wrote:
> Is the below flow correct for UML (TT mode)
Maybe, maybe not - your terminology is somewhat confusing.
> 1. UML process wants to execute a sys call say open().
> 2. UML TT comes to know this
By having PTRACE_SYSCALL on the host return status SIGTRAP | 0x80 from wait().
> annuls with getpid(), and UML TT executes
> open() on behalf of UML process.
If UML TT refers to the tracing thread, this is wrong. The TT ptraces
a set of (UML) kernel register values into the process, and it (not
the TT) executes the open.
> 3. UML process executes the getpid() and returns and signals TT.
This happened before step 2.
> 4. By this time UML TT has finished executing the system call open and
> has returned back, so TT fills in the registers of UML process.
The system-call-making process finished executing in the UML kernel,
and signals the TT (by sending itself a signal, which will bump the TT
out of wait()) that it should return to userspace.
> 5. Now UML process executes normally with the open file descriptor.
>
> If the above steps are correct, then How does UML protects host kernel.
> because even here TT will ask for host kernel services which may corrupt
> host kernel ?
The *host* kernel is protected by hardware. UML is a normal process
with no more access to the host kernel than ls.
There is a related, good question here, which is how is the UML kernel
protected, given that it is present, and not protected, in the process
address space. The answer is that it isn't, at least not without
severe performance penalties. This is largely what led to the skas
modes.
Jeff
--
Work email - jdike at linux dot intel dot com
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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-03-19 17:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 2:38 [uml-devel] Regarding System call virtualization Krishnappa Abhijith-A21204
2007-03-19 17:36 ` 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=20070319173629.GA11790@c2.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=abhijith@motorola.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox