linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] Regarding System call virtualization
@ 2007-03-19  2:38 Krishnappa Abhijith-A21204
  2007-03-19 17:36 ` Jeff Dike
  0 siblings, 1 reply; 2+ messages in thread
From: Krishnappa Abhijith-A21204 @ 2007-03-19  2:38 UTC (permalink / raw)
  To: user-mode-linux-devel


[-- Attachment #1.1: Type: text/plain, Size: 733 bytes --]

Hi,
        Is the below flow correct for UML (TT mode)
 
1. UML process wants to execute a sys call say open().
2. UML TT comes to know this annuls with getpid(), and UML TT executes
open() on behalf of UML process.
3. UML process executes the getpid() and returns and signals TT.
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.
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 ? 
Is there any method by which it is prevented ?
 
Thanks a lot.
Abhi

[-- Attachment #1.2: Type: text/html, Size: 2387 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 194 bytes --]

_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [uml-devel] Regarding System call virtualization
  2007-03-19  2:38 [uml-devel] Regarding System call virtualization Krishnappa Abhijith-A21204
@ 2007-03-19 17:36 ` Jeff Dike
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2007-03-19 17:36 UTC (permalink / raw)
  To: Krishnappa Abhijith-A21204; +Cc: user-mode-linux-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-19 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-19  2:38 [uml-devel] Regarding System call virtualization Krishnappa Abhijith-A21204
2007-03-19 17:36 ` Jeff Dike

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