Hi.. > Hi Fernando. What I need is a way to fill out the pt_regs structure > itself with the same values that are in the pt_regs structure of the > currently running process. Let's say I have my own system call > sys_do_something(). So when I'm inside the kernel mode, an want to > call sys_clone() from within this new function I must put my_regs as > parameter to sys_clone(). Actually, pt_regs are not passed by value or by reference. These values are found on kernel mode stack. In other word, you must make sure that the current kernel stack contains the needed value started from top of the stack (lower address on x86). I have no real experience about it, but you can check the code comment on the top of arch/i386/kernel/entry.S. Also, pay attention SAVE_ALL macro and places where this macro is called. I hope you get the picture how the saved registers are ordered on kernel stack. That's exactly how you must save the registers... regards, Mulyadi -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/