From: "bibo,mao" <bibo.mao@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [small patch] ia64 find thread for user rbs address
Date: Thu, 16 Nov 2006 07:54:37 +0000 [thread overview]
Message-ID: <455C193D.9090509@intel.com> (raw)
hi,
I encountered one problem when running ptrace test case, the
situation is this: traced process's syscall parameter needs to
be accessed, but for sys_clone system call with clone_flag
(CLONE_VFORK | CLONE_VM | SIGCHLD) parameter. this syscall's
parameter accessing result is wrong.
The reason is that with clone_flag(CLONE_VFORK | CLONE_VM | SIGCHLD),
cloned thread's mm point is the same, but tgid is different.
without this patch find_thread_for_addr will return cloned thread,
but not the thread which call sys_clone syscall.
thanks
bibo,mao
--- 2.6.19-rc5.org/arch/ia64/kernel/ptrace.c 2006-11-16 16:23:31.000000000 +0800
+++ 2.6.19-rc5/arch/ia64/kernel/ptrace.c 2006-11-16 16:25:07.000000000 +0800
@@ -607,7 +607,7 @@ find_thread_for_addr (struct task_struct
*/
list_for_each_safe(this, next, ¤t->children) {
p = list_entry(this, struct task_struct, sibling);
- if (p->mm != mm)
+ if (p->tgid != child->tgid)
continue;
if (thread_matches(p, addr)) {
child = p;
next reply other threads:[~2006-11-16 7:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-16 7:54 bibo,mao [this message]
2006-11-16 9:42 ` [small patch] ia64 find thread for user rbs address bibo,mao
2006-11-17 7:12 ` Zhang, Yanmin
2006-11-17 7:18 ` bibo,mao
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=455C193D.9090509@intel.com \
--to=bibo.mao@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox