Re: [Linux-ia64] sys_clone() related info/help/pointer needed

From: Raj Patil <>
Date: 2003-05-31 02:21:54
Thanks for your comments/info David.
(was out for few days...)
One thing I am not clear is why should it be different when sys_clone()
is called as part of the regulare syscall and from a module as another
syscall. Both of them are going through the same path; sys_clone(),
do_fork(), copy_thread(). Am I missing something vey obvious to see the
BTW: I bought "ia-64 linux kernel design and implementation" book.
         It is very well wriiten. 
         I am going through the 3rd chapter on threads for clone2()/
        switch_stack/copy_thread etc. It will take some time to digest 
         the info....

David Mosberger <> wrote:

>>>>> On Thu, 22 May 2003 13:36:19 -0700 (PDT), Raj Patil said:

Raj> The progam basically adds an entry to syscall table, and when
Raj> this new syscall is called, it simply calls sys_clone() with
Raj> same arguments. (like making a duplicate sys_clone call)
Raj> static long my_call(unsigned long flags, unsigned long sz) {
Raj> rc=sys_clone(flags, sz); /* sys_clone is exported */ ...... }
Raj> Everything seems to work excpet that the child process created
Raj> is not getting executed.

clone() (or, more correctly: clone2()) is special: it needs both a
pt_regs and a switch_stack structure at the top of the stack (see
comments in arch/ia64/kernel/process.c for copy_thread()). Your
test-case doesn't work because it probably isn't creating the
switch_stack structure at all.


Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
Received on Fri May 30 09:21:56 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:15 EST