From: Raj Patil <rpatil0296@yahoo.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] sys_clone() related info/help/pointer needed
Date: Fri, 30 May 2003 16:21:54 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590723706087@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590723705986@msgid-missing>
[-- Attachment #1: Type: text/plain, Size: 1582 bytes --]
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
difference?
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....
Thanks,
Raj
David Mosberger <davidm@napali.hpl.hp.com> 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.
--david
---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
[-- Attachment #2: Type: text/html, Size: 2256 bytes --]
next prev parent reply other threads:[~2003-05-30 16:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-22 20:36 [Linux-ia64] sys_clone() related info/help/pointer needed Raj Patil
2003-05-27 16:57 ` David Mosberger
2003-05-30 16:21 ` Raj Patil [this message]
2003-05-30 17:47 ` David Mosberger
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=marc-linux-ia64-105590723706087@msgid-missing \
--to=rpatil0296@yahoo.com \
--cc=linux-ia64@vger.kernel.org \
/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.