linux-um archives
 help / color / mirror / Atom feed
From: BlaisorBlade <blaisorblade_spam@yahoo.it>
To: kuas <ku4s@users.sourceforge.net>,
	user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] System Call Mechanism
Date: Wed, 25 Feb 2004 16:52:52 +0100	[thread overview]
Message-ID: <200402251652.52680.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <40352B06.3030406@users.sourceforge.net>

Alle 22:30, giovedì 19 febbraio 2004, kuas ha scritto:
> Hello,
>
> I'm posting this question to here since this is development problem, the
> other newsgroup seems to be more like users problem and I would think
> this forum would be able to explain more about my question. I will post
> to the other newsgroup if that's the  one where I should really be posting

Perfect choice. I'll try to answer, for things I know or I *think* to know.

> I seems to me the new or current implementation of system call involves
> conversion from interupt 80 at the host OS into signals back in UML
> kernel. Is this the same mechanism for the current TT and SKAS? Or  TT
> mode still using ptrace thread tracing mechanism to intercept the system
> call?

SKAS mode, the more modern one, still uses the same interception mechanism as 
TT: i.e. ptraces the child, intercepts the syscall, nullifies it (i.e. the 
host kernel receives a getpid syscall) and goes on. Look at these files:

arch/um/kernel/skas/process.c: handle_trap () and userspace().
arch/um/kernel/skas/syscall_*.c

Only difference is that in SKAS mode you have one single child process being 
ptraced, on the host; it runs the virtual processes code, and does syscall 
with int 0x80 which are intercepted. To do a context switch, UML uses setjmp 
and longjmp to switch the stack state and PTRACE_SWITCH_MM (implemented on 
the host inside arch/i386/kernel/ptrace.c, read the skas patch) to switch the 
virtual mappings of the child at once. More details about memory handling at 
request, since you asked for one exact thing and maybe are not interested in 
this.

> If there is a signal from the host to UML kernel process, there
> must be a signal handler registered by the UML kernel.
>
> Any quick deeper overview about this mechanism would be really welcome.
> Thanks in advance.


-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&opÌk
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2004-02-25 19:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-19 21:30 [uml-devel] System Call Mechanism kuas
2004-02-25 15:52 ` BlaisorBlade [this message]
2004-02-28  2:29   ` Kuas
2004-02-29 12:26     ` BlaisorBlade

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=200402251652.52680.blaisorblade_spam@yahoo.it \
    --to=blaisorblade_spam@yahoo.it \
    --cc=ku4s@users.sourceforge.net \
    --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