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 <[EMAIL PROTECTED]> 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_id344&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