linux-um archives
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade@yahoo.it>
To: Young Koh <young.koh@gmail.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] Explaination of system call function flow in TT mode
Date: Mon, 16 May 2005 23:24:37 +0200	[thread overview]
Message-ID: <200505162324.37749.blaisorblade@yahoo.it> (raw)
In-Reply-To: <3524bf1f05051611528eb7bc1@mail.gmail.com>

On Monday 16 May 2005 20:52, Young Koh wrote:
> Hi, Thanks for the reply. Let me have one following question.
>
> As my understand, in SKAS mode, tracer and tracee are different host
> processes, and they have UML kernel code and application code
> respectively. (in TT mode, tracee has both kernel and application
> code)
Yes, exactly.
> Suppose the tracee attmpts to invoke a host system call. then, it will
> be intercepted by the tracer as in TT mode. (In TT mode, the tracer
> turns off tracing and sends SIGUSR2 to the tracee, and then, the
> signal handler in the tracee will execute the system call.)
Ok, perfect.
> but, in 
> SKAS mode, because the tracee doesn't have the UML kernel code, only
> the tracer knows about the system call code. The tracer cannot simply
> send a signal to make the tracee execute the system call. Then how
> does it do? Does the tracer execute the system call for the tracee?

Exactly. in arch/um/kernel/skas/process.c, userspace() loops doing 
PTRACE_SYSCALL, and when SIGTRAP | 0x80 is received by waiting on the tracee, 
and it's handled by handle_trap(), which reads the syscall params in the 
registers saved by userspace. You'll probably find the 0x80 strange, since 
ptrace(2) documents SIGTRAP; but in recent UML kernels we set 
PTRACE_O_SYSGOOD so we get the additional 0x80 (which does not happen on 
normal SIGTRAP, due for instance to singlestepping).

See, in arch/i386/kernel/ptrace.c:do_syscall_trace(), the call to 
ptrace_notify().
-- 
Paolo Giarrusso, aka Blaisorblade
Skype user "PaoloGiarrusso"
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  parent reply	other threads:[~2005-05-16 22:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <003e01c503b3$f3e46cb0$ac655e0a@sha.st.com>
2005-01-28 19:10 ` [uml-devel] Explaination of system call function flow in TT mode Blaisorblade
2005-02-02 15:29   ` [uml-devel] " Alex LIU
2005-02-03 19:38     ` Blaisorblade
2005-05-16 14:08   ` [uml-devel] " Young Koh
2005-05-16 17:08     ` Blaisorblade
2005-05-16 18:52       ` Young Koh
2005-05-16 20:52         ` Jeff Dike
2005-05-16 21:24         ` Blaisorblade [this message]
2005-05-17  0:09           ` Young Koh
2005-05-17  0:17             ` Blaisorblade
2005-05-17 17:56               ` Young Koh
2005-05-17 22:00                 ` Jeff Dike
2005-05-18  9:47                   ` Bodo Stroesser
2005-05-18 13:24                     ` Young Koh
2005-05-18 14:57                       ` Blaisorblade
2005-05-18 15:09                         ` Jeff Dike
2005-05-18 15:26                         ` Bodo Stroesser
2005-05-18 15:03                       ` Jeff Dike
2005-05-18 13:33                     ` Jeff Dike
2005-05-18 15:20                       ` Bodo Stroesser
2005-05-18 15:28                         ` Blaisorblade
2006-02-09 22:08   ` Young Koh
2006-02-09 23:38     ` Jeff Dike

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=200505162324.37749.blaisorblade@yahoo.it \
    --to=blaisorblade@yahoo.it \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=young.koh@gmail.com \
    /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