From: Young Koh <young.koh@gmail.com>
To: Blaisorblade <blaisorblade@yahoo.it>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] Explaination of system call function flow in TT mode
Date: Tue, 17 May 2005 13:56:55 -0400 [thread overview]
Message-ID: <3524bf1f050517105676c6c051@mail.gmail.com> (raw)
In-Reply-To: <200505170217.23138.blaisorblade@yahoo.it>
Well, i got another question/suggestion.
the tracer (UML kernel) saves and restores the tracee's registers
using ptrace() in order to get syscall paramaters and save the return
value. while doing this, the tracer would need to care about only six
registers(eax, ebx, ecx, edx, esi, and edi) used for the syscall
parameter passing. I think, the tracer doesn't have to save all the
registers of the tracee, because the tracer will execute the syscall
for the tracee and the context of tracee will not be affected.
but, in arch/um/kernel/skas/process.c, move_registers() function gets
and sets even floating point registers, which i don't think will be
affected by the system call execution.
i tested and ran a UML kernel with the second ptrace() (used for
floating point registers) commented out, it seems to work. (probably
only for SKAS mode)
what do you think?
Thanks,
static int move_registers(int pid, int int_op, int fp_op,
union uml_pt_regs *regs, unsigned long *fp_regs)
{
if(ptrace(int_op, pid, 0, regs->skas.regs) < 0)
return(-errno);
#if 0 // for test
if(ptrace(fp_op, pid, 0, fp_regs) < 0)
return(-errno);
#endif
return(0);
}
On 5/16/05, Blaisorblade <blaisorblade@yahoo.it> wrote:
> On Tuesday 17 May 2005 02:09, Young Koh wrote:
> > Ok, now i'm getting close. Thanks a lot!!!
> > but i have two more :)
> >
> > 1) in SKAS mode, the tracer (UML kernel) will execute a system call
> > for the tracee (the user process). But what if the system call blocks?
> > then, the tracer, the UML kernel, will be blocked, too, right? it
> > means the whole UML system will be blocked?
> Good question. However the tracee is one of the threads running inside UML,
> i.e. switch_to_skas switches between the different tracees. However, that's
> done only on timer interrupts, and possibly those interrupts are blocked by
> the syscall execution.
>
> Indeed, I remember that when the UBD I/O is run by the UML kernel and not by a
> separate thread (this has been removed) the whole system becomes *really*
> slow, so probably the answer to your question is "Yes, but UML tries to avoid
> this".
>
> > 2) in TT mode, what if the user process (tracee) installs its own
> > signal handler for SIGUSR2?
> The syscall is intercepted so it can't install signal handlers; the one it
> installs are handled inside the UML kernel.
> --
> 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_idt12&alloc_id\x16344&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
next prev parent reply other threads:[~2005-05-17 17:57 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
2005-05-17 0:09 ` Young Koh
2005-05-17 0:17 ` Blaisorblade
2005-05-17 17:56 ` Young Koh [this message]
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=3524bf1f050517105676c6c051@mail.gmail.com \
--to=young.koh@gmail.com \
--cc=blaisorblade@yahoo.it \
--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.