From: "Luming Yu" <luming.yu@gmail.com>
To: Roland McGrath <roland@redhat.com>
Cc: Petr Tesarik <ptesarik@suse.cz>,
LKML <linux-kernel@vger.kernel.org>,
linux-ia64@vger.kernel.org
Subject: Re: [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race
Date: Fri, 23 May 2008 03:42:35 +0000 [thread overview]
Message-ID: <3877989d0805222042p176da844k384ea512b1cfb0da@mail.gmail.com> (raw)
In-Reply-To: <20080522203428.835D626FA24@magilla.localdomain>
On Fri, May 23, 2008 at 4:34 AM, Roland McGrath <roland@redhat.com> wrote:
>> Sorry for confusion, Let me try to explain it more:
>
> I understand these code paths (I wrote them).
>
>> If TASK_TRACED is not set earlier before arch_ptrace_stop on ia64
>> ptrace_notify code path, some signals would be delivered without
>> letting debugger run.. (i.e. PTRACED logica in get_signal_to_deliver
>> would be ignored totally!). These should cause the test case hang on
>> ia64. And x86 just works..
>
> I do not understand this at all, and it has given no information you did
> not give before. Please describe the scenario you see in fine-grained
> terms.
>
In the code path mentioned above, I see only ia64 has chance to let
ptraced thread deliver those pending signals before TASK_TRACED is
set. Then debugger thread would lose chance to interfere the
delivering of those signals if I correctly understand PT_PTRACED logic
in get_signal_to_deliver, and the relationship between the two flag :
TASK_TRACED and PT_TRACED.
Since you write those code, Please clarify, in ptrace_notify code
path, is it allowed that ptraced thread can run signal handler without
telling debugger what happened?
I noticed the only difference between x86 and IA64 , and it does make
the test case work on
x86, and fail on IA64... So I made the patch trying to eliminate the
difference. It indeed seems to solve my problem although it is still
hack, and I don't know what kind of signals strace handled has such
magic..
As for how the door is only open for ia64, I can explain further if
you want to know.
next prev parent reply other threads:[~2008-05-23 3:42 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 2:47 [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-05-22 8:47 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-05-22 9:16 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-05-22 11:18 ` Roland McGrath
2008-05-22 12:12 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-05-22 20:39 ` Roland McGrath
2008-05-23 12:33 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-05-22 13:24 ` Luming Yu
2008-05-22 20:34 ` Roland McGrath
2008-05-23 3:42 ` Luming Yu [this message]
2008-05-23 4:19 ` Roland McGrath
2008-05-23 5:24 ` Luming Yu
2008-05-26 0:15 ` Roland McGrath
2008-05-26 1:30 ` Luming Yu
2008-05-27 3:31 ` Luming Yu
2008-05-27 4:04 ` Roland McGrath
2008-05-27 5:49 ` Luming Yu
2008-05-27 6:12 ` Roland McGrath
2008-05-27 6:25 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-06-03 6:04 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-06-03 9:01 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-06-03 14:32 ` Petr Tesarik
2008-06-03 21:01 ` Roland McGrath
2008-06-03 21:31 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luck, Tony
2008-06-03 22:13 ` Roland McGrath
2008-06-10 8:23 ` Luming Yu
2008-06-04 2:16 ` Luming Yu
2008-06-04 9:16 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-06-05 1:49 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-06-05 11:16 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a Petr Tesarik
2008-06-06 0:07 ` Roland McGrath
2008-09-09 3:06 ` [RFC PATCH] set TASK_TRACED before arch_ptrace code to fix a race Luming Yu
2008-09-10 5:55 ` Roland McGrath
2008-09-16 8:50 ` Luming Yu
2008-09-17 17:01 ` Roland McGrath
2008-09-18 5:44 ` Luming Yu
2008-05-27 6:34 ` Luming Yu
2008-05-27 8:48 ` Luming Yu
2008-05-28 9:14 ` Luming Yu
2008-06-03 6:02 ` Luming Yu
2008-05-30 8:05 ` Roland McGrath
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=3877989d0805222042p176da844k384ea512b1cfb0da@mail.gmail.com \
--to=luming.yu@gmail.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ptesarik@suse.cz \
--cc=roland@redhat.com \
/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